]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Do not actually return after generating a call, there are other isntructions following
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index bd53048cc28e282b690d0be52f766badfc6666a6..1ffcd998927a437459041cd79a53195b72a38465 100644 (file)
--- a/main.c
+++ b/main.c
@@ -24,7 +24,7 @@
 typedef struct { char *name, type; } argitem;
 VECTOR_MAKE(argitem, items);
 
-static const int usage(const char *const app) {
+static int usage(const char *app) {
     printf("usage:\n"
            "    %s -c<file>          -oprog.dat -- compile file\n"
            "    %s -a<file>          -oprog.dat -- assemble file\n"
@@ -105,7 +105,6 @@ int main(int argc, char **argv) {
                 if (util_strncmpexact(&argv[1][1], "memchk", 6)) { opts_memchk = true; break; }
                 if (util_strncmpexact(&argv[1][1], "help",   4)) {
                     return usage(app);
-                    break;
                 }
                 /* compiler type selection */
                 if (util_strncmpexact(&argv[1][1], "std=qcc"   , 7 )) { opts_compiler = COMPILER_QCC;    break; }
@@ -130,7 +129,7 @@ int main(int argc, char **argv) {
                     opts_omit_nullcode = true;
                     break;
                 }
-                return printf("invalid command line argument: %s\n", argv[1]);
+                return printf("invalid command line argument: %s\n",argv[1]);
 
         }
         ++argv;