From a7610064ae4fbccfcff8b91656dfee3f55d21c9c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 7 Apr 2010 16:39:07 +0200 Subject: [PATCH] util: make gcc shut up --- util.c | 2 +- util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index 03c60af9..43826990 100644 --- a/util.c +++ b/util.c @@ -1133,7 +1133,7 @@ int close_all_fds(const int except[], unsigned n_except) { return -errno; while ((de = readdir(d))) { - int fd; + int fd = -1; if (de->d_name[0] == '.') continue; diff --git a/util.h b/util.h index af39accc..d0fd66dd 100644 --- a/util.h +++ b/util.h @@ -163,7 +163,7 @@ bool ignore_file(const char *filename); } \ type name##_from_string(const char *s) { \ type i; \ - unsigned u; \ + unsigned u = 0; \ assert(s); \ for (i = 0; i < (type)ELEMENTSOF(name##_table); i++) \ if (streq(name##_table[i], s)) \ -- 2.39.5