mapi32: Write-strings warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Sun Jun 4 04:45:40 CDT 2006


>>
>> would it be safe to omit the initialization of "address"?
> 
> Yes, but it shortens the lines below and improves readability of
> the code.
> 
>  -Hans

I am sorry to make such a meal of this, but - in addition to the
write-strings issue - I noticed that the original code initialized
"address" thus:

    char *address = "";

(which you correctly then constified).

What I am saying is, because of all the checking code which follows, can we
be confident that every message->lpRecips[i].lpszAddress must have gained a
value, and therefore just write

    const char *address;

for "address", without the empty-string initial assignment?

I shall post the patch, in essence, as you kindly stated, to supersede my
earlier offerings before Alexandre gets a chance to look at my mess. But it
would be nice to know the answer to the above. Again - and without much
thinking - if "address" does need to be set to a default value, should it
be to empty-string, or to NULL?

-- Andy.





More information about the wine-devel mailing list