summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh2
-rw-r--r--src/core/machine-id-setup.c2
-rw-r--r--src/core/manager.c2
-rw-r--r--src/shared/ask-password-api.c3
-rw-r--r--src/tmpfiles/tmpfiles.c7
5 files changed, 10 insertions, 6 deletions
diff --git a/autogen.sh b/autogen.sh
index eeb0c1b5e3..d0873422a9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -54,7 +54,7 @@ args="$args \
fi
if [ "x$1" = "xc" ]; then
- ./configure CFLAGS='-g -O0' $args
+ ./configure CFLAGS='-g -Og' $args
make clean
else
echo
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c
index 18e015fe7f..1b55da7e56 100644
--- a/src/core/machine-id-setup.c
+++ b/src/core/machine-id-setup.c
@@ -153,7 +153,7 @@ static int generate(char id[34]) {
int machine_id_setup(void) {
_cleanup_close_ int fd = -1;
int r;
- bool writable;
+ bool writable = false;
struct stat st;
char id[34]; /* 32 + \n + \0 */
diff --git a/src/core/manager.c b/src/core/manager.c
index 01db2b0be9..60c22e31d7 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2062,7 +2062,7 @@ void manager_dispatch_bus_query_pid_done(
int manager_open_serialization(Manager *m, FILE **_f) {
char *path = NULL;
- int fd;
+ int fd = -1;
FILE *f;
assert(_f);
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);
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);