mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
gcc: fix mistakes discovered by recent gcc
Recent versions of gcc issue a couple of warnings, which may be real bugs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
c4e16f7e7c
commit
7daa26f9ba
@ -199,7 +199,7 @@ static void list_address(int64_t offset, const char *brackets,
|
|||||||
|
|
||||||
static void list_output(const struct out_data *data)
|
static void list_output(const struct out_data *data)
|
||||||
{
|
{
|
||||||
char q[20];
|
char q[24];
|
||||||
uint64_t size = data->size;
|
uint64_t size = data->size;
|
||||||
uint64_t offset = data->offset;
|
uint64_t offset = data->offset;
|
||||||
const uint8_t *p = data->data;
|
const uint8_t *p = data->data;
|
||||||
|
@ -436,6 +436,8 @@ insn *parse_line(int pass, char *buffer, insn *result)
|
|||||||
bool recover;
|
bool recover;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
nasm_static_assert(P_none == 0);
|
||||||
|
|
||||||
restart_parse:
|
restart_parse:
|
||||||
first = true;
|
first = true;
|
||||||
result->forw_ref = false;
|
result->forw_ref = false;
|
||||||
@ -444,7 +446,6 @@ restart_parse:
|
|||||||
stdscan_set(buffer);
|
stdscan_set(buffer);
|
||||||
i = stdscan(NULL, &tokval);
|
i = stdscan(NULL, &tokval);
|
||||||
|
|
||||||
nasm_static_assert(P_none == 0);
|
|
||||||
memset(result->prefixes, P_none, sizeof(result->prefixes));
|
memset(result->prefixes, P_none, sizeof(result->prefixes));
|
||||||
result->times = 1; /* No TIMES either yet */
|
result->times = 1; /* No TIMES either yet */
|
||||||
result->label = NULL; /* Assume no label */
|
result->label = NULL; /* Assume no label */
|
||||||
|
Loading…
Reference in New Issue
Block a user