summaryrefslogtreecommitdiff
path: root/tests/test-lockfile.c
diff options
context:
space:
mode:
authorGurucharan Shetty <gshetty@nicira.com>2014-04-03 16:07:43 -0700
committerGurucharan Shetty <gshetty@nicira.com>2014-04-04 07:34:10 -0700
commitd2586fce485240801bdfdd73ad4679b9c88bc659 (patch)
tree311de835773f595dc9e1a624649adc99a0609ff8 /tests/test-lockfile.c
parent79bda8258b5365438a70d08c74fab903f1dc0a29 (diff)
downloadopenvswitch-d2586fce485240801bdfdd73ad4679b9c88bc659.tar.gz
Avoid static declarations of arrays with unknown size.
Visual studio does not like it. This commit is similar to commit 3815d6c2c (Avoid designated initializers and static decls of arrays of unknown size.) but touches more files. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests/test-lockfile.c')
-rw-r--r--tests/test-lockfile.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/test-lockfile.c b/tests/test-lockfile.c
index 80cc5a84a..0bf3fe6dd 100644
--- a/tests/test-lockfile.c
+++ b/tests/test-lockfile.c
@@ -35,7 +35,7 @@ struct test {
void (*function)(void);
};
-static const struct test tests[];
+static void run_help(void);
#define CHECK(A, B) check(A, B, #A, #B, __FILE__, __LINE__)
static void
@@ -237,19 +237,6 @@ run_lock_symlink_to_dir(void)
lockfile_unlock(a);
}
-static void
-run_help(void)
-{
- size_t i;
-
- printf("usage: %s TESTNAME\n"
- "where TESTNAME is one of the following:\n",
- program_name);
- for (i = 0; tests[i].name; i++) {
- fprintf(stderr, "\t%s\n", tests[i].name);
- }
-}
-
static const struct test tests[] = {
#define TEST(NAME) { #NAME, run_##NAME }
TEST(lock_and_unlock),
@@ -268,6 +255,19 @@ static const struct test tests[] = {
};
static void
+run_help(void)
+{
+ size_t i;
+
+ printf("usage: %s TESTNAME\n"
+ "where TESTNAME is one of the following:\n",
+ program_name);
+ for (i = 0; tests[i].name; i++) {
+ fprintf(stderr, "\t%s\n", tests[i].name);
+ }
+}
+
+static void
test_lockfile_main(int argc, char *argv[])
{
size_t i;