]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
testfw: Declare all variables before the first statement
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 2 Aug 2010 22:17:26 +0000 (00:17 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 2 Aug 2010 22:17:26 +0000 (00:17 +0200)
test/main.c

index 0a05b5869117e6c860727f751c2d5bfdf28f03b7..0de08b5c48f917a1a9e5dce904af2bbe27f60abe 100644 (file)
@@ -34,8 +34,15 @@ const char USAGE_TEXT[] =
        "    -h, --help      print this help text\n"
        "    -v, --verbose   enable verbose logging of tests\n";
 
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
 {
+       suite_fn suites[] = {
+#define SUITE(name) &suite_##name,
+#include "test/suites.h"
+#undef SUITE
+               NULL
+       };
        static const struct option options[] = {
                {"help", no_argument, NULL, 'h'},
                {"verbose", no_argument, NULL, 'v'},
@@ -62,13 +69,6 @@ int main(int argc, char **argv)
                }
        }
 
-       suite_fn suites[] = {
-#define SUITE(name) &suite_##name,
-#include "test/suites.h"
-#undef SUITE
-               NULL
-       };
-
        if (getenv("RUN_FROM_BUILD_FARM")) {
                verbose = 1;
        }