Skip to content

Commit 94c6ecd

Browse files
redzimskihpax
authored andcommitted
fix [warning push] causing "unknown warning name"
[warning push] emitted a "unknown warning name" warning when -w+unknown-warning is set.
1 parent ca178f8 commit 94c6ecd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

asm/directiv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,9 @@ bool process_directives(char *directive)
526526
push_warnings();
527527
else if (!nasm_stricmp(value, "pop"))
528528
pop_warnings();
529+
} else {
530+
set_warning_status(value);
529531
}
530-
set_warning_status(value);
531532
break;
532533

533534
case D_CPU: /* [CPU] */

travis/test/warnstack.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"id": "warnstack",
55
"format": "bin",
66
"source": "warnstack.asm",
7-
"option": "-Ox",
7+
"option": "-Ox -w+unknown-warning",
88
"target": [
99
{ "output": "warnstack.bin" },
1010
{ "stderr": "warnstack.stderr" }

0 commit comments

Comments
 (0)