]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fix more warnings
authorDale Weiler <killfieldengine@gmail.com>
Thu, 22 Nov 2012 20:32:08 +0000 (20:32 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 22 Nov 2012 20:32:08 +0000 (20:32 +0000)
Makefile
ftepp.c
ir.c
main.c
util.c

index 94b8b0b417f27886181ae78126cb159965816254..727f68cc07eb9c85eefcebe201bd809e834f7712 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,6 @@ ifeq ($(CC), clang)
                -Weverything                  \
                -Wno-missing-prototypes       \
                -Wno-unused-parameter         \
-               -Wno-sign-compare             \
-               -Wno-implicit-fallthrough     \
                -Wno-sign-conversion          \
                -Wno-conversion               \
                -Wno-disabled-macro-expansion \
diff --git a/ftepp.c b/ftepp.c
index 1d734305406602d4c48e0312554f2b5384e2f70f..e677e74a49af7c48b6ea4ea7f09fef6aecd6dc58 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -1115,7 +1115,7 @@ static bool ftepp_hash(ftepp_t *ftepp)
                 ftepp_error(ftepp, "unrecognized preprocessor directive: `%s`", ftepp_tokval(ftepp));
                 return false;
             }
-            break;
+            /* break; never reached */
         default:
             ftepp_error(ftepp, "unexpected preprocessor token: `%s`", ftepp_tokval(ftepp));
             return false;
diff --git a/ir.c b/ir.c
index a8d54f07437601a5559c0c2ece87d1d144a733b7..f4910fe7d68bf626898d583a2e14877c9b0e35ac 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -3167,7 +3167,7 @@ bool ir_builder_generate(ir_builder *self, const char *filename)
 const char *qc_opname(int op)
 {
     if (op < 0) return "<INVALID>";
-    if (op < ( sizeof(asm_instr) / sizeof(asm_instr[0]) ))
+    if (op < (int)( sizeof(asm_instr) / sizeof(asm_instr[0]) ))
         return asm_instr[op].m;
     switch (op) {
         case VINSTR_PHI:  return "PHI";
diff --git a/main.c b/main.c
index 3ebbcc981c779a97811cfc93b62bebf0e6617242..ce09f357b91bf3aad074b9b86bfd472852131fd6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -256,7 +256,7 @@ static bool options_parse(int argc, char **argv) {
                 case 'h':
                     usage();
                     exit(0);
-                    break;
+                    /* break; never reached because of exit(0) */
 
                 case 'E':
                     opts_pp_only = true;
diff --git a/util.c b/util.c
index a900889e57b90f983d776c44326e02935d9eee7b..8b54251c76ed447e52c4b15f38b70b7888745c98 100644 (file)
--- a/util.c
+++ b/util.c
@@ -270,8 +270,8 @@ void util_endianswap(void *m, int s, int l) {
     if(*((char *)&s))
         return;
 
-    for(; w < l; w++) {
-        for(;  i < s << 1; i++) {
+    for(; w < (size_t)l; w++) {
+        for(;  i < (size_t)(s << 1); i++) {
             unsigned char *p = (unsigned char *)m+w*s;
             unsigned char  t = p[i];
             p[i]             = p[s-i-1];