summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-14 13:44:35 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-14 13:44:35 -0800
commitc3c6cea83804e7ba36b31d15ba25954ea3a5bdfd (patch)
tree41fe090811ef04a83ef89444ea628aa2f1a20c29 /output
parent80c4f23c52427382e455fd656bcbeeb60d725811 (diff)
downloadnasm-c3c6cea83804e7ba36b31d15ba25954ea3a5bdfd.tar.gz
warnings: make WARN_* constant obligatory for warnings
Make it an error to have ERR_WARNING without a suppression level. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r--output/outmacho.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/output/outmacho.c b/output/outmacho.c
index 3d4767d0..820136f6 100644
--- a/output/outmacho.c
+++ b/output/outmacho.c
@@ -472,7 +472,7 @@ static int64_t add_reloc(struct section *sect, int32_t section,
break;
case RL_SUB: /* obsolete */
- nasm_error(ERR_WARNING, "relcation with subtraction"
+ nasm_error(ERR_WARNING|WARN_OTHER, "relcation with subtraction"
"becomes to be obsolete");
r->ext = 0;
r->type = X86_64_RELOC_SUBTRACTOR;
@@ -559,7 +559,7 @@ static void macho_output(int32_t secto, const void *data,
s = get_section_by_index(secto);
if (!s) {
- nasm_error(ERR_WARNING, "attempt to assemble code in"
+ nasm_error(ERR_WARNING|WARN_OTHER, "attempt to assemble code in"
" section %d: defaulting to `.text'", secto);
s = get_section_by_name("__TEXT", "__text");
@@ -581,10 +581,10 @@ static void macho_output(int32_t secto, const void *data,
is_bss = (s->flags & SECTION_TYPE) == S_ZEROFILL;
if (is_bss && type != OUT_RESERVE) {
- nasm_error(ERR_WARNING, "attempt to initialize memory in "
+ nasm_error(ERR_WARNING|WARN_OTHER, "attempt to initialize memory in "
"BSS section: ignored");
/* FIXME */
- nasm_error(ERR_WARNING, "section size may be negative"
+ nasm_error(ERR_WARNING|WARN_OTHER, "section size may be negative"
"with address symbols");
s->size += realsize(type, size);
return;
@@ -595,7 +595,7 @@ static void macho_output(int32_t secto, const void *data,
switch (type) {
case OUT_RESERVE:
if (!is_bss) {
- nasm_error(ERR_WARNING, "uninitialized space declared in"
+ nasm_error(ERR_WARNING|WARN_OTHER, "uninitialized space declared in"
" %s,%s section: zeroing", s->segname, s->sectname);
sect_write(s, NULL, size);
@@ -1655,7 +1655,7 @@ static void macho_write (void)
if (seg_nsects > 0)
offset = macho_write_segment (offset);
else
- nasm_error(ERR_WARNING, "no sections?");
+ nasm_error(ERR_WARNING|WARN_OTHER, "no sections?");
if (nsyms > 0) {
/* write out symbol command */