msi: Remove tentative definition of static array with no size specifier
rob at codeweavers.com
Thu Apr 3 03:14:59 CDT 2008
Andrew Talbot wrote:
> James Hawkins wrote:
>> It's ugly. What warning are you trying to fix?
> Although I imagine that gcc doesn't do anything particularly adverse as a
> result of the existing code, if the pedantic switch were applied it would
> cause a message of the following type to be generated.
> action.c:236: error: array size missing in ?StandardActions?
> I believe it is also likely to show up under lint-like tools and I believe
> it is actually an error, though compilers are not required to generate any
> message, apparently. I couldn't say whether the resultant behaviour is
> undefined, implemenation defined, or what. And I don't know whether gcc
> places any surplus baggage in any segment as a result. The fix was just to
> make the code correct and hence more portable.
This also causes problems when compiling with msvc:
> make: Entering directory `/home/rob/wine-msvc/dlls/msi'
> CC action.o
> action.c(236) : error C2133: 'StandardActions' : unknown size
It also might affect compilers on other platforms that Wine might be
ported to. As Andy says, it's non-standard behaviour and so could break
even in future versions of gcc.
I think the patch could be changed so that very few, if any, forward
declarations would need to be made simply by moving
ACTION_HandleStandardAction to after StandardActions is initialised.
More information about the wine-devel