From: Jim Meyering Date: Wed, 28 Oct 2009 08:26:04 +0000 (+0100) Subject: exclude: avoid an unwarranted warning X-Git-Tag: v0.1~5284 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=57eaa6500c8afacc43b4dd301e6ff7123ee2fe48;p=gnulib.git exclude: avoid an unwarranted warning * lib/exclude.c (excluded_file_name): Initialize "rc" before switch. --- diff --git a/ChangeLog b/ChangeLog index 793ae5062..54a79e86e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-28 Jim Meyering + + exclude: avoid an unwarranted warning + * lib/exclude.c (excluded_file_name): Initialize "rc" before switch. + 2009-10-27 Eric Blake fseek: avoid compilation failure when fflush is replaced diff --git a/lib/exclude.c b/lib/exclude.c index 3ceeed7be..310c5abc2 100644 --- a/lib/exclude.c +++ b/lib/exclude.c @@ -412,7 +412,9 @@ excluded_file_name (struct exclude const *ex, char const *f) excluded to included or vice versa. */ for (seg = ex->head; seg; seg = seg->next) { - bool rc; + /* Pacify gcc, so it doesn't issue a spurious + "may be used uninitialized" warning. */ + bool rc = excluded; switch (seg->type) {