summaryrefslogtreecommitdiff
path: root/vswitchd/ovs-vswitchd.c
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 /vswitchd/ovs-vswitchd.c
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 'vswitchd/ovs-vswitchd.c')
-rw-r--r--vswitchd/ovs-vswitchd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index 4d7e4f0fd..b0d08e8af 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -59,7 +59,7 @@ static bool want_mlockall;
static unixctl_cb_func ovs_vswitchd_exit;
static char *parse_options(int argc, char *argv[], char **unixctl_path);
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
int
main(int argc, char *argv[])