I sent a V2 based Ben's suggestion.
On Thu, Apr 24, 2014 at 3:45 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Apr 24, 2014 at 03:41:52PM -0700, Gurucharan Shetty wrote: >> On Thu, Apr 24, 2014 at 2:48 PM, Andy Zhou <az...@nicira.com> wrote: >> > Visual studio does not support 0 size array within a struct, >> > but supports flexible array. For example, char p[0] is not supported, >> > but char p[] is O.K. GCC supports both. >> > >> > Flexible array can not directly replace a zero sized array. >> > http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html lists the >> > differences. >> > >> > Commits 644cfd84772eb7d8 and 6fdaa45a6f6c9 make use of 0 size array. >> > Convert them to flexible array so that visual studio can compile them >> > as well. >> > >> > Reported-by: Gurucharan Shetty <gshe...@nicira.com> >> > Signed-off-by: Andy Zhou <az...@nicira.com> >> >> Eitan pointed out off-list that Zero sized arrays are supported on >> visual studio as an extension. >> >> In this particular case, zero sized array was indirectly included in >> the middle of the structure and that is not supported. >> >> So the fix is still needed, but the commit message could do with a change. > > Sometimes these trailing zero-length or flexible array members don't > actually add any value (because it's easy to just use ofpbuf_push() or > ofpbuf_pull() to get past the header). Sometimes the code is even > easier to read without them. You might want to check whether deleting > them (probably adding a comment saying what follows) and then updating > the previous users is a good solution. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev