Change REFIID to IID* for stack declarations in oaidl_p.c to avoid initializers being discarded
mike at navi.cx
Sun Jun 27 17:32:05 CDT 2004
On Sun, 27 Jun 2004 21:13:17 +0200, Marcus Meissner wrote:
>> + It is usually generated directly by MIDL, however this file has
>> + been tweaked since then to account for slight differences in the way
>> + gcc and MSVC++ compile it. In particular, in some functions REFIIDs
>> + declared on the stack have been converted to plain IID* in order to eliminate
>> + the constness of the REFIID type, ensuring that the zero initializer is not
>> + discarded.
>> + Therefore, please do not regenerate this file.
> The comment is not understandable.
> Shouldn't it read '"REFIID" should not be used, because the value is not "const"'?
I don't understand that wording of the comment either unfortunately :( It's not that it
shouldn't be used, it's more that in the original generated code (I think) it was written
(REFIID ) riid = 0;
I'm not sure why MIDL did this, but as REFIID is simply
#define REFIID const IID* const
changing those instances to IID* should "fix" it without any warnings about assigning to
a readonly variable.
REFIID can still be used elsewhere though.
More information about the wine-devel