From: Joel Rosdahl Date: Mon, 2 Aug 2010 22:17:26 +0000 (+0200) Subject: testfw: Declare all variables before the first statement X-Git-Tag: v3.1~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20bec5d8c63beb4059292d3aa89d3b8263b2facf;p=thirdparty%2Fccache.git testfw: Declare all variables before the first statement --- diff --git a/test/main.c b/test/main.c index 0a05b5869..0de08b5c4 100644 --- a/test/main.c +++ b/test/main.c @@ -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; }