request.h: size of unnamed array is negative
André Hentschel
nerv at dawncrow.de
Sat Apr 13 12:28:55 CDT 2013
Am 13.04.2013 15:39, schrieb Hugh McMaster:
> I've been adding a new handler to Wine's server. Unfortunately, I've run into a problem with C_ASSERT that I can't seem to resolve.
>
> In server/request.h, I've added the following code:
>
> C_ASSERT( FIELD_OFFSET(struct get_desktop_workarea_request, spi_workarea) == 16 );
> C_ASSERT( sizeof(struct get_desktop_workarea_request) == 16 );
> C_ASSERT( FIELD_OFFSET(struct get_desktop_workarea_reply, screen_x) == 4 );
> C_ASSERT( FIELD_OFFSET(struct get_desktop_workarea_reply, screen_y) == 4 );
> C_ASSERT( sizeof(struct get_desktop_workarea_reply) == 8 );
>
> But the compiler ends with output errors, as in the following:
>
> In file included from request.c:69:0:
> request.h:1527:1: error: size of unnamed array is negative
> request.h:1528:1: error: size of unnamed array is negative
> request.h:1529:1: error: size of unnamed array is negative
> request.h:1530:1: error: size of unnamed array is negative
> request.h:1531:1: error: size of unnamed array is negative
>
> Each error represents the C_ASSERT code listed above.
>
> I'm probably missing something obvious here. Can someone please offer any advice on resolving these errors?
we'd need more info like the actual struct get_desktop_workarea_request
More information about the wine-devel
mailing list