From df28bc0836ad6a79cb537ad0b463819738088f3e Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 21 Oct 2013 15:24:18 +0200 Subject: 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. --- src/shared/ask-password-api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/shared') diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 4557155d45..755abf0b5e 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -250,7 +250,8 @@ static int create_socket(char **name) { } sa = { .un.sun_family = AF_UNIX, }; - int one = 1, r; + int one = 1; + int r = 0; char *c; assert(name); -- cgit v1.2.3-54-g00ecf