mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
assemble_file: Get rid of global variable @sb
fixes pvs-studio error 'V707 Giving short names to global variables is considered to be bad practice. It is suggested to rename 'sb' variable. gorcunov@: Use local non-static variable. Signed-off-by: Martin Lindhe <martin-commit@ubique.se> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
58f37c1736
commit
8cc93f5232
1 changed files with 2 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ static FILE *error_file; /* Where to write error messages */
|
|||
|
||||
FILE *ofile = NULL;
|
||||
int optimizing = MAX_OPTIMIZE; /* number of optimization passes to take */
|
||||
static int sb, cmd_sb = 16; /* by default */
|
||||
static int cmd_sb = 16; /* by default */
|
||||
|
||||
static iflag_t cpu;
|
||||
static iflag_t cmd_cpu;
|
||||
|
|
@ -1257,6 +1257,7 @@ static void assemble_file(char *fname, StrList **depend_ptr)
|
|||
expr *e;
|
||||
int pass_max;
|
||||
char debugid[128];
|
||||
int sb;
|
||||
|
||||
if (cmd_sb == 32 && iflag_ffs(&cmd_cpu) < IF_386)
|
||||
nasm_fatal(0, "command line: 32-bit segment size requires a higher cpu");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue