diff options
author | H. Peter Anvin <hpa@zytor.com> | 2018-06-02 23:48:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2018-06-02 23:48:16 -0700 |
commit | 7daa26f9ba3ca45813d16ce540564448c13b16fa (patch) | |
tree | ce1b0e0f1b9f1942c1922a3cbb685fe3136e90b5 | |
parent | c4e16f7e7c1492f34ba4544d435e387fa2d97cd7 (diff) | |
download | nasm-7daa26f9ba3ca45813d16ce540564448c13b16fa.tar.gz |
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>
-rw-r--r-- | asm/listing.c | 2 | ||||
-rw-r--r-- | asm/parser.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/asm/listing.c b/asm/listing.c index 40af8a62..6c459e13 100644 --- a/asm/listing.c +++ b/asm/listing.c @@ -199,7 +199,7 @@ static void list_address(int64_t offset, const char *brackets, static void list_output(const struct out_data *data) { - char q[20]; + char q[24]; uint64_t size = data->size; uint64_t offset = data->offset; const uint8_t *p = data->data; diff --git a/asm/parser.c b/asm/parser.c index 622259c8..40188410 100644 --- a/asm/parser.c +++ b/asm/parser.c @@ -436,6 +436,8 @@ insn *parse_line(int pass, char *buffer, insn *result) bool recover; int i; + nasm_static_assert(P_none == 0); + restart_parse: first = true; result->forw_ref = false; @@ -444,7 +446,6 @@ restart_parse: stdscan_set(buffer); i = stdscan(NULL, &tokval); - nasm_static_assert(P_none == 0); memset(result->prefixes, P_none, sizeof(result->prefixes)); result->times = 1; /* No TIMES either yet */ result->label = NULL; /* Assume no label */ |