summaryrefslogtreecommitdiff
path: root/nasm.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2011-12-05 01:39:04 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2011-12-05 01:39:04 +0400
commit3b8c2974a13a4c73b2a31a8e84d446ef56574897 (patch)
treee25b5b2577bac95559decd5521de3761e3d24d91 /nasm.c
parent0e754dcafea4d8d458928afb0cc786517244b3f8 (diff)
downloadnasm-3b8c2974a13a4c73b2a31a8e84d446ef56574897.tar.gz
nasm-3b8c2974a13a4c73b2a31a8e84d446ef56574897.tar.bz2
nasm-3b8c2974a13a4c73b2a31a8e84d446ef56574897.zip
Use proper bracing on setting warnings in comman line parsing
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'nasm.c')
-rw-r--r--nasm.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/nasm.c b/nasm.c
index ed49a3e..da6f8bf 100644
--- a/nasm.c
+++ b/nasm.c
@@ -868,20 +868,22 @@ static bool process_arg(char *p, char *q)
param++;
set_warning:
- for (i = 0; i <= ERR_WARN_MAX; i++)
- if (!nasm_stricmp(param, warnings[i].name))
- break;
- if (i <= ERR_WARN_MAX)
- warning_on_global[i] = do_warn;
- else if (!nasm_stricmp(param, "all"))
- for (i = 1; i <= ERR_WARN_MAX; i++)
- warning_on_global[i] = do_warn;
- else if (!nasm_stricmp(param, "none"))
- for (i = 1; i <= ERR_WARN_MAX; i++)
- warning_on_global[i] = !do_warn;
- else
- nasm_error(ERR_NONFATAL | ERR_NOFILE | ERR_USAGE,
- "invalid warning `%s'", param);
+ for (i = 0; i <= ERR_WARN_MAX; i++) {
+ if (!nasm_stricmp(param, warnings[i].name))
+ break;
+ }
+ if (i <= ERR_WARN_MAX) {
+ warning_on_global[i] = do_warn;
+ } else if (!nasm_stricmp(param, "all")) {
+ for (i = 1; i <= ERR_WARN_MAX; i++)
+ warning_on_global[i] = do_warn;
+ } else if (!nasm_stricmp(param, "none")) {
+ for (i = 1; i <= ERR_WARN_MAX; i++)
+ warning_on_global[i] = !do_warn;
+ } else {
+ nasm_error(ERR_NONFATAL | ERR_NOFILE | ERR_USAGE,
+ "invalid warning `%s'", param);
+ }
break;
case 'M':