diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-12-02 18:56:46 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-12-02 19:35:01 +0100 |
commit | 9e9e49224fb4a7fae7b98205e1165fbfcea2453f (patch) | |
tree | 6dce0490cd23526c9d1013c6cfb1143249403309 /src/scan-skel.l | |
parent | 8b53f4e022eff4c54ce1916aefec8a04cad6be97 (diff) | |
download | bison-9e9e49224fb4a7fae7b98205e1165fbfcea2453f.tar.gz |
diagnostics: style changes
* src/complain.h, src/complain.c: Comment changes.
* src/scan-skel.l: Reduce scopes.
* data/skeletons/bison.m4: Factor diagnostic functions.
Diffstat (limited to 'src/scan-skel.l')
-rw-r--r-- | src/scan-skel.l | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/scan-skel.l b/src/scan-skel.l index 0303b494..121aac07 100644 --- a/src/scan-skel.l +++ b/src/scan-skel.l @@ -209,22 +209,23 @@ at_basename (int argc, char *argv[], char **out_namep, int *out_linenop) static void at_complain (int argc, char *argv[], char **out_namep, int *out_linenop) { - static int indent; - warnings w = flag (argv[1]); - location loc; - location *locp = NULL; + if (argc < 4) + fail_for_at_directive_too_few_args (argv[0]); (void) out_namep; (void) out_linenop; - if (argc < 4) - fail_for_at_directive_too_few_args (argv[0]); + warnings w = flag (argv[1]); + + location loc; + location *locp = NULL; if (argv[2] && argv[2][0]) { boundary_set_from_string (&loc.start, argv[2]); boundary_set_from_string (&loc.end, argv[3]); locp = &loc; } + static int indent; if (w & silent) indent += SUB_INDENT; else |