diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-02-25 14:21:01 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-02-25 14:21:01 -0800 |
commit | 8dfa32f6a5c8570ab2eb0f379491209a3d4494c9 (patch) | |
tree | ea255fdf88741a619f93f717e172d328c73e5e34 /lib-src/make-docfile.c | |
parent | 564ff1f20ced473e10179fc5a4cc1c85cb572b2b (diff) | |
download | emacs-8dfa32f6a5c8570ab2eb0f379491209a3d4494c9.tar.gz |
* make-docfile.c (scan_c_file): Refactor local variable decls to make their scope
more accurate and to avoid a GCC -Wuninitialized diagnostic.
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r-- | lib-src/make-docfile.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 12dbdbee219..f900ea42e91 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -658,12 +658,8 @@ scan_c_file (char *filename, const char *mode) 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'; @@ -693,6 +689,10 @@ scan_c_file (char *filename, const char *mode) 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') { @@ -726,7 +726,6 @@ scan_c_file (char *filename, const char *mode) continue; defvarflag = 1; - defunflag = 0; c = getc (infile); defvarperbufferflag = (c == 'P'); @@ -738,8 +737,6 @@ scan_c_file (char *filename, const char *mode) type = LISP_OBJECT; else if (c == 'B') type = BOOLEAN; - else - type = INVALID; } c = getc (infile); @@ -758,8 +755,6 @@ scan_c_file (char *filename, const char *mode) continue; c = getc (infile); defunflag = c == 'U'; - defvarflag = 0; - defvarperbufferflag = 0; } else continue; |