Skip to content

Commit ab37d5a

Browse files
committed
genksyms: make source_file a local variable in lexer
This is only used in yylex() in lex.l Signed-off-by: Masahiro Yamada <[email protected]>
1 parent aec6c60 commit ab37d5a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

scripts/genksyms/genksyms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static struct symbol *symtab[HASH_BUCKETS];
2929
static FILE *debugfile;
3030

3131
int cur_line = 1;
32-
char *cur_filename, *source_file;
32+
char *cur_filename;
3333
int in_source_file;
3434

3535
static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types,

scripts/genksyms/genksyms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ typedef struct string_list **yystype;
4747
#define YYSTYPE yystype
4848

4949
extern int cur_line;
50-
extern char *cur_filename, *source_file;
50+
extern char *cur_filename;
5151
extern int in_source_file;
5252

5353
struct symbol *find_symbol(const char *name, enum symbol_type ns, int exact);

scripts/genksyms/lex.l

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ yylex(void)
125125
126126
static int suppress_type_lookup, dont_want_brace_phrase;
127127
static struct string_list *next_node;
128+
static char *source_file;
128129
129130
int token, count = 0;
130131
struct string_list *cur_node;

0 commit comments

Comments
 (0)