aic7xxx: Fix re-building firmware with -fno-common

The generated C output for aicasm_scan.l defines yylineno already, so
references to it from other files should use an extern declaration.

The STAILQ_HEAD use in aicasm_symbol.h also provided an identifier,
causing it to both define the struct type and define a variable of that
struct type, causing any C file including the header to define the same
variable. This variable is not used (and confusingly clashes with a
field name just below) and was likely caused by confusion when switching
between defining fields using similar type macros and defining the type
itself.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D30525
This commit is contained in:
Jessica Clarke 2021-05-28 19:07:17 +01:00
parent 6bb5699d2b
commit 5e912f5fec
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@
#include "aicasm_symbol.h"
#include "aicasm_insformat.h"
int yylineno;
extern int yylineno;
char *yyfilename;
char stock_prefix[] = "aic_";
char *prefix = stock_prefix;

View file

@ -110,7 +110,7 @@ struct macro_arg {
regex_t arg_regex;
char *replacement_text;
};
STAILQ_HEAD(macro_arg_list, macro_arg) args;
STAILQ_HEAD(macro_arg_list, macro_arg);
struct macro_info {
struct macro_arg_list args;