compiler: Define NO_RETURN for MSVC.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 15 Sep 2014 19:58:09 +0000 (12:58 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Mon, 15 Sep 2014 22:15:35 +0000 (15:15 -0700)
commit270f328621bfd8f80659150d5d3eec51754b5bfb
treec068c18ce82dcee21750e55f61ee2b3e4e157064
parentd72eff6cec01187d9b6b0f8befdbdec0943e6012
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>
20 files changed:
lib/compiler.h
lib/stream-nossl.c
lib/util.h
lib/vlog.h
ovsdb/ovsdb-client.c
ovsdb/ovsdb-server.c
ovsdb/ovsdb-tool.c
tests/test-jsonrpc.c
tests/test-netflow.c
tests/test-ovsdb.c
tests/test-rstp.c
tests/test-sflow.c
tests/test-stp.c
utilities/ovs-dpctl.c
utilities/ovs-ofctl.c
utilities/ovs-testcontroller.c
utilities/ovs-vsctl.c
vswitchd/ovs-vswitchd.c
vswitchd/system-stats.c
vtep/vtep-ctl.c