]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fix another warning
authorDale Weiler <killfieldengine@gmail.com>
Fri, 28 Dec 2012 12:36:15 +0000 (12:36 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 28 Dec 2012 12:36:15 +0000 (12:36 +0000)
splint.sh
test.c

index 8408918940269b66ab0e4245bcaa4a7c7ee6a092..0347bc421a1f03c4a29ce12772dd2070b5e8a3dc 100755 (executable)
--- a/splint.sh
+++ b/splint.sh
@@ -64,7 +64,6 @@ FLAGS_MAYBE="\
 # remove one flag from here at a time while fixing the code so that
 FLAGS_TOFIX="\
     -boolcompare         \
-    -unreachable         \
     -incondefs           \
     -initallelements     \
     -macroredef          \
diff --git a/test.c b/test.c
index 1111c370ed87394ea7fcb9cae729486662907aac..5756d452a30983862062a215c41eb4024ff8b230 100644 (file)
--- a/test.c
+++ b/test.c
@@ -127,23 +127,6 @@ FILE ** task_popen(const char *command, const char *mode) {
         goto task_popen_error_3;
     }
 
-    /*
-     * clang is stupid, it doesn't understand that yes, this code
-     * is actually reachable.
-     */
-#   ifdef __clang__
-#       pragma clang diagnostic push
-#       pragma clang diagnostic ignored "-Wunreachable-code"
-#   endif
-    if (argv)
-        vec_free(argv);
-
-#   ifdef __clang__
-#    pragma clang diagnostic pop
-#   endif
-
-    return data->handles;
-
 task_popen_error_3: close(errhandle[0]), close(errhandle[1]);
 task_popen_error_2: close(outhandle[0]), close(outhandle[1]);
 task_popen_error_1: close(inhandle [0]), close(inhandle [1]);