From 0b1724894fb85aa1c07b2619e9269cfafd736956 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 22 Jan 2011 01:47:37 +0100 Subject: [PATCH] gcc: make gcc shut up --- src/cgroup-util.c | 8 ++++---- src/util.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cgroup-util.c b/src/cgroup-util.c index 4cf184ae..b68b9ad3 100644 --- a/src/cgroup-util.c +++ b/src/cgroup-util.c @@ -188,7 +188,7 @@ int cg_kill(const char *controller, const char *path, int sig, bool ignore_self, my_pid = getpid(); do { - pid_t pid; + pid_t pid = 0; done = true; if ((r = cg_enumerate_processes(controller, path, &f)) < 0) { @@ -362,7 +362,7 @@ int cg_migrate(const char *controller, const char *from, const char *to, bool ig my_pid = getpid(); do { - pid_t pid; + pid_t pid = 0; done = true; if ((r = cg_enumerate_tasks(controller, from, &f)) < 0) { @@ -782,9 +782,9 @@ finish: } int cg_is_empty(const char *controller, const char *path, bool ignore_self) { - pid_t pid; + pid_t pid = 0; int r; - FILE *f; + FILE *f = NULL; bool found = false; assert(controller); diff --git a/src/util.c b/src/util.c index d3876ded..ef37d057 100644 --- a/src/util.c +++ b/src/util.c @@ -250,7 +250,7 @@ int parse_boolean(const char *v) { } int parse_pid(const char *s, pid_t* ret_pid) { - unsigned long ul; + unsigned long ul = 0; pid_t pid; int r; -- 2.39.5