From fdcb20a34f15fb29d9ab4ff6321a1cb42aca2287 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 17 Jul 2013 02:52:41 +0200 Subject: util: make gcc shut up by passing a 0 mode param to open() If we pass a variable to open()'s flags parameter it really wants a mode parameter too, otherwise some gcc version whine. Hence, pass 0 in that case. --- src/libudev/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libudev/util.c b/src/libudev/util.c index 10a786368e..ad16df83dd 100644 --- a/src/libudev/util.c +++ b/src/libudev/util.c @@ -618,8 +618,10 @@ int open_terminal(const char *name, int mode) { * https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245 */ + assert(!(mode & O_CREAT)); + for (;;) { - fd = open(name, mode); + fd = open(name, mode, 0); if (fd >= 0) break; -- cgit v1.2.3-54-g00ecf