summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGurucharan Shetty <gshetty@nicira.com>2014-09-15 12:58:09 -0700
committerGurucharan Shetty <gshetty@nicira.com>2014-09-15 15:15:35 -0700
commit270f328621bfd8f80659150d5d3eec51754b5bfb (patch)
treec068c18ce82dcee21750e55f61ee2b3e4e157064 /tests
parentd72eff6cec01187d9b6b0f8befdbdec0943e6012 (diff)
downloadopenvswitch-270f328621bfd8f80659150d5d3eec51754b5bfb.tar.gz
compiler: Define NO_RETURN for MSVC.
To prevent warnings such as "Not all control paths return a value", we should define NO_RETURN for MSVC. Currently for gcc, we add NO_RETURN at the end of function declaration. But for MSVC, "__declspec(noreturn)" is needed at the beginning of function declaration. So this commit moves NO_RETURN to the beginning of the function declaration as it works with gcc and clang too. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-jsonrpc.c2
-rw-r--r--tests/test-netflow.c2
-rw-r--r--tests/test-ovsdb.c2
-rw-r--r--tests/test-rstp.c5
-rw-r--r--tests/test-sflow.c2
-rw-r--r--tests/test-stp.c5
6 files changed, 8 insertions, 10 deletions
diff --git a/tests/test-jsonrpc.c b/tests/test-jsonrpc.c
index dbd0b5210..cf90c4434 100644
--- a/tests/test-jsonrpc.c
+++ b/tests/test-jsonrpc.c
@@ -35,7 +35,7 @@
#include "vlog.h"
#include "ovstest.h"
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
static struct command *get_all_commands(void);
diff --git a/tests/test-netflow.c b/tests/test-netflow.c
index 76f9baedb..284d7ab4c 100644
--- a/tests/test-netflow.c
+++ b/tests/test-netflow.c
@@ -35,7 +35,7 @@
#include "vlog.h"
#include "ovstest.h"
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
static unixctl_cb_func test_netflow_exit;
diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
index ebb24c08f..4d73a0dd3 100644
--- a/tests/test-ovsdb.c
+++ b/tests/test-ovsdb.c
@@ -51,7 +51,7 @@
#include "util.h"
#include "vlog.h"
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
static struct command *get_all_commands(void);
diff --git a/tests/test-rstp.c b/tests/test-rstp.c
index afc5b600d..96c611a33 100644
--- a/tests/test-rstp.c
+++ b/tests/test-rstp.c
@@ -335,10 +335,9 @@ simulate(struct test_case *tc, int granularity)
}
}
-static void
+NO_RETURN static void
err(const char *message, ...)
- PRINTF_FORMAT(1, 2)
- NO_RETURN;
+ PRINTF_FORMAT(1, 2);
static void
err(const char *message, ...)
diff --git a/tests/test-sflow.c b/tests/test-sflow.c
index b91fd4118..1d512ada1 100644
--- a/tests/test-sflow.c
+++ b/tests/test-sflow.c
@@ -38,7 +38,7 @@
#include "vlog.h"
#include "ovstest.h"
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
static unixctl_cb_func test_sflow_exit;
diff --git a/tests/test-stp.c b/tests/test-stp.c
index c4e59335e..45f0f4c61 100644
--- a/tests/test-stp.c
+++ b/tests/test-stp.c
@@ -316,10 +316,9 @@ simulate(struct test_case *tc, int granularity)
}
}
-static void
+NO_RETURN static void
err(const char *message, ...)
- PRINTF_FORMAT(1, 2)
- NO_RETURN;
+ PRINTF_FORMAT(1, 2);
static void
err(const char *message, ...)