[ovs-git] [openvswitch/ovs] 270f32: compiler: Define NO_RETURN for MSVC.

GitHub noreply at github.com
Mon Sep 15 22:16:47 UTC 2014

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 270f328621bfd8f80659150d5d3eec51754b5bfb
  Author: Gurucharan Shetty <gshetty at nicira.com>
  Date:   2014-09-15 (Mon, 15 Sep 2014)

  Changed paths:
    M lib/compiler.h
    M lib/stream-nossl.c
    M lib/util.h
    M lib/vlog.h
    M ovsdb/ovsdb-client.c
    M ovsdb/ovsdb-server.c
    M ovsdb/ovsdb-tool.c
    M tests/test-jsonrpc.c
    M tests/test-netflow.c
    M tests/test-ovsdb.c
    M tests/test-rstp.c
    M tests/test-sflow.c
    M tests/test-stp.c
    M utilities/ovs-dpctl.c
    M utilities/ovs-ofctl.c
    M utilities/ovs-testcontroller.c
    M utilities/ovs-vsctl.c
    M vswitchd/ovs-vswitchd.c
    M vswitchd/system-stats.c
    M vtep/vtep-ctl.c

  Log Message:
  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 at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>

More information about the git mailing list