[ovs-dev] [PATCH 1/4] Fix "Not all control paths return a value" warning by MSVC.

Gurucharan Shetty shettyg at nicira.com
Mon Sep 15 21:45:06 UTC 2014


On Mon, Sep 15, 2014 at 11:41 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Sep 15, 2014 at 10:36:11AM -0700, Gurucharan Shetty wrote:
>> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
>
> It looks like these could be avoided by letting MSVC know that
> ovs_fatal() does not return.  Can that be done by #defining NO_RETURN
> to __declspec(noreturn) with MSVC?
I see now why we don't get these warnings for gcc. For MSVC,
__declspec(noreturn) needs to be at the beginning of the function. It
looks like that works for gcc/clang too. But it looks a little odd. I
sent another patch with that change for a look.



More information about the dev mailing list