more accurate and to avoid a GCC -Wuninitialized diagnostic.
* make-docfile.c (write_globals): Change char * to char const *
to avoid a GCC "assignment discards qualifiers" diagnostic
in some configurations.
+ (scan_c_file): Refactor local variable decls to make their scope
+ more accurate and to avoid a GCC -Wuninitialized diagnostic.
2011-02-22 Eli Zaretskii <eliz@gnu.org>
FILE *infile;
register int c;
register int commas;
- register int defunflag;
- register int defvarperbufferflag;
- register int defvarflag;
int minargs, maxargs;
int extension = filename[strlen (filename) - 1];
- enum global_type type;
if (extension == 'o')
filename[strlen (filename) - 1] = 'c';
while (!feof (infile))
{
int doc_keyword = 0;
+ int defunflag = 0;
+ int defvarperbufferflag = 0;
+ int defvarflag = 0;
+ enum global_type type = INVALID;
if (c != '\n' && c != '\r')
{
continue;
defvarflag = 1;
- defunflag = 0;
c = getc (infile);
defvarperbufferflag = (c == 'P');
type = LISP_OBJECT;
else if (c == 'B')
type = BOOLEAN;
- else
- type = INVALID;
}
c = getc (infile);
continue;
c = getc (infile);
defunflag = c == 'U';
- defvarflag = 0;
- defvarperbufferflag = 0;
}
else continue;