* ebrowse.c (parse_qualified_param_ident_or_type): Make it clear
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Feb 2011 05:41:42 +0000 (21:41 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 Feb 2011 05:41:42 +0000 (21:41 -0800)
to reader (and to the compiler) that the loop always executes at
least once.  This prevents a warning with recent GCC.

lib-src/ChangeLog
lib-src/ebrowse.c

index c57ee2f..578b3e4 100644 (file)
@@ -1,5 +1,9 @@
 2011-02-26  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * ebrowse.c (parse_qualified_param_ident_or_type): Make it clear
+       to reader (and to the compiler) that the loop always executes at
+       least once.  This prevents a warning with recent GCC.
+
        * fakemail.c: Include <ignore-value.h>.
        (put_line): Explicitly ignore fwrite return value, for benefit of
        recent glibc + gcc.
index 60baf99..c2b1fb9 100644 (file)
@@ -2952,7 +2952,9 @@ parse_qualified_param_ident_or_type (char **last_id)
   static char *id = NULL;
   static int id_size = 0;
 
-  while (LOOKING_AT (IDENT))
+  assert (LOOKING_AT (IDENT));
+
+  do
     {
       int len = strlen (yytext) + 1;
       if (len > id_size)
@@ -2975,6 +2977,7 @@ parse_qualified_param_ident_or_type (char **last_id)
       else
        break;
     }
+  while (LOOKING_AT (IDENT));
 }