implement -W
authorMatthias Braun <matze@braunis.de>
Tue, 9 Mar 2010 21:37:35 +0000 (21:37 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 9 Mar 2010 21:37:35 +0000 (21:37 +0000)
[r27280]

main.c

diff --git a/main.c b/main.c
index 27fff81..93b4dbe 100644 (file)
--- a/main.c
+++ b/main.c
@@ -935,7 +935,9 @@ int main(int argc, char **argv)
                                        strncpy(cpu_arch, opt, sizeof(cpu_arch));
                                }
                        } else if (option[0] == 'W') {
-                               if (strstart(option + 1, "p,")) {
+                               if (option[1] == '\0') {
+                                       /* ignore -W, out defaults are already quiet verbose */
+                               } else if (strstart(option + 1, "p,")) {
                                        // pass options directly to the preprocessor
                                        const char *opt;
                                        GET_ARG_AFTER(opt, "-Wp,");