[ovs-dev] [PATCH 1/2] dpif-netdev: Don't use designated initializers.

Jesse Gross jesse at nicira.com
Tue Jul 14 15:27:15 UTC 2015


On Tue, Jul 14, 2015 at 8:18 AM, Gurucharan Shetty <shettyg at nicira.com> wrote:
> On Mon, Jul 13, 2015 at 2:12 PM, Jesse Gross <jesse at nicira.com> wrote:
>> On Fri, Jul 10, 2015 at 9:26 PM, Gurucharan Shetty <shettyg at nicira.com> wrote:
>>> MSVC 2013 does not like designated initializers when
>>> structs are initialized inside structs.
>>>
>>> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
>>
>> This looks fine to me, although there are several other instances of
>> this pattern in other places. Are the ones in ofproto/ofproto-dpif.c,
>> for example, which also initialize .support different enough that they
>> slip into some weird corner case that is OK?
> I started looking more at the reason on why the change in dpif-netdev
> causes failures and why the use of designated initializers in
> ofproto-dpif does not. So one thing that I have in public domain is
> this: https://connect.microsoft.com/VisualStudio/feedback/details/805981/msvc-2013-c99-designated-initializers-cannot-initialize-unions-within-structs
>
> Based on the above, my first feeling is that because struct flow has
> unions inside it, that may be the reason. I also noticed that
> Microsoft had marked the issue as resolved. So I downloaded their
> latest upgrade pack "visual studio 2103 update 4" and that does not
> have any problems. Looks like Appveyor uses the same upgrade pack and
> so we do not see the same problem at appveyor anymore.
>
> So I will just drop this patch and use the latest MSVC 2013 instead.

Awesome!



More information about the dev mailing list