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 793ae50..54a79e8 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 3ceeed7..310c5ab 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)
        {