chiark / gitweb /
build-sys: use -Og instead of -O0 to catch warnings
[elogind.git] / src / tmpfiles / tmpfiles.c
index e23847bbea65e1180598720c92ab30c178d41d8e..8051cb36ec6fd6fc0768e871b4aab0d6dca124a5 100644 (file)
@@ -465,8 +465,10 @@ static int item_set_perms(Item *i, const char *path) {
 }
 
 static int write_one_file(Item *i, const char *path) {
-        int r, e, fd, flags;
+        int e, flags;
+        int fd = -1;
         struct stat st;
+        int r = 0;
 
         flags = i->type == CREATE_FILE ? O_CREAT|O_APPEND :
                 i->type == TRUNCATE_FILE ? O_CREAT|O_TRUNC : 0;
@@ -638,8 +640,9 @@ static int glob_item(Item *i, int (*action)(Item *, const char *)) {
 }
 
 static int create_item(Item *i) {
-        int r, e;
+        int e;
         struct stat st;
+        int r = 0;
 
         assert(i);