gcc: Fix compile errors due to anonymous union initilization.
authorWilliam Tu <u9012063@gmail.com>
Thu, 18 Feb 2016 02:00:22 +0000 (18:00 -0800)
committerBen Pfaff <blp@ovn.org>
Mon, 22 Feb 2016 18:04:03 +0000 (10:04 -0800)
commite8fed7d01ca6fb6c7e96faf2b831fcfa4552cb4a
tree296425544006b786242034825cb3214bf5aa2531
parente0512257a9750d42359111c659d9d50be809d89f
gcc: Fix compile errors due to anonymous union initilization.

gcc 4.4.7 lets you initialize named fields, and assign to anonymous union members,
but cannot statically initialize a named member of an anonymous union. This causes
errors when doing make:
fproto/fail-open.c: In function ‘send_bogus_packet_ins’:
ofproto/fail-open.c:130: error: unknown field ‘pin’ specified in initializer
ofproto/fail-open.c:131: error: unknown field ‘up’ specified in initializer
ofproto/fail-open.c:132: error: unknown field ‘packet’ specified in initializer
ofproto/fail-open.c:132: warning: missing braces around initializer
ofproto/fail-open.c:132: warning: (near initialization for ‘am.<anonymous>.pin.up’)
ofproto/fail-open.c:134: error: extra brace group at end of initializer

Examaple: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42875
We can either assign a name to the union or, in this patch, remove the unnecessary union.

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ofproto/connmgr.h