[ovs-git] [openvswitch/ovs] 66bab9: openvswitch/types.h: Drop the member name in initi...

GitHub noreply at github.com
Thu Jan 25 18:36:49 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 66bab9c9dad103bd5ff3d25484ea6920df62de94
      https://github.com/openvswitch/ovs/commit/66bab9c9dad103bd5ff3d25484ea6920df62de94
  Author: Shashank Ram <rams at vmware.com>
  Date:   2018-01-25 (Thu, 25 Jan 2018)

  Changed paths:
    M include/openvswitch/types.h

  Log Message:
  -----------
  openvswitch/types.h: Drop the member name in initializer macro

MSVC++ compiler does not allow initializing a struct while
explicitly initializing a member in the struct.

Not allowed:
    static const struct eth_addr a = {{ .ea= { 0xff, 0xff, 0xff, 0xff,
                                  0xff, 0xff }}};

Alowed:
    static const struct eth_addr b  = {{{ 0xff, 0xff, 0xff, 0xff, 0xff,
                                    0xff }}};
*An extra curly brace is required for GCC in case the struct contains
a union.

Signed-off-by: Shashank Ram <rams at vmware.com>
Tested-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list