exclude: avoid an unwarranted warning
authorJim Meyering <meyering@redhat.com>
Wed, 28 Oct 2009 08:26:04 +0000 (09:26 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 28 Oct 2009 08:27:06 +0000 (09:27 +0100)
* lib/exclude.c (excluded_file_name): Initialize "rc" before switch.

ChangeLog
lib/exclude.c

index 793ae5062efea68547ad70b435c799aea7805259..54a79e86ed7df524b536cf8fa94ac04823650298 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-28  Jim Meyering  <meyering@redhat.com>
+
+       exclude: avoid an unwarranted warning
+       * lib/exclude.c (excluded_file_name): Initialize "rc" before switch.
+
 2009-10-27  Eric Blake  <ebb9@byu.net>
 
        fseek: avoid compilation failure when fflush is replaced
index 3ceeed7befae9d0b578e0c01dd187f3a912fbaf0..310c5abc2474c43da29c78898f2cc500f2133364 100644 (file)
@@ -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)
        {