summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-10-21 15:24:18 +0200
committerKay Sievers <kay@vrfy.org>2013-10-21 15:46:00 +0200
commitdf28bc0836ad6a79cb537ad0b463819738088f3e (patch)
tree5f60b455f0f3e65df99292764e3cd3f0a53b6887 /src/tmpfiles
parentd1f0e886e1407ab50834127ce52710e1aff13938 (diff)
build-sys: use -Og instead of -O0 to catch warnings
$ touch src/core/dbus.c; make CFLAGS=-O0 make --no-print-directory all-recursive Making all in . CC src/core/libsystemd_core_la-dbus.lo CCLD libsystemd-core.la $ touch src/core/dbus.c; make CFLAGS=-Og make --no-print-directory all-recursive Making all in . CC src/core/libsystemd_core_la-dbus.lo src/core/dbus.c: In function 'init_registered_system_bus': src/core/dbus.c:798:18: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized] dbus_free(id); ^ CCLD libsystemd-core.la -Og Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience.
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index e23847bbea..8051cb36ec 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -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);