Re: mapi32: Write-strings warnings fix
Andrew Talbot <Andrew.Talbot(a)talbotville.com> writes:
@@ -113,8 +114,8 @@ } if (message->nFileCount) FIXME("Ignoring attachments\n");
- subject = message->lpszSubject ? message->lpszSubject : ""; - body = message->lpszNoteText ? message->lpszNoteText : ""; + subject = message->lpszSubject ? message->lpszSubject : empty; + body = message->lpszNoteText ? message->lpszNoteText : empty;
These are not part of a Win32 API structure, there's no reason they can't be made const. -- Alexandre Julliard julliard(a)winehq.org
Alexandre Julliard wrote:
Andrew Talbot <Andrew.Talbot(a)talbotville.com> writes:
@@ -113,8 +114,8 @@ } if (message->nFileCount) FIXME("Ignoring attachments\n");
- subject = message->lpszSubject ? message->lpszSubject : ""; - body = message->lpszNoteText ? message->lpszNoteText : ""; + subject = message->lpszSubject ? message->lpszSubject : empty; + body = message->lpszNoteText ? message->lpszNoteText : empty;
These are not part of a Win32 API structure, there's no reason they can't be made const.
Great. I shall submit a patch to declare all the string elements of Wine's MapiMessage type as LPCSTR. Thanks, -- Andy.
Andrew Talbot <Andrew.Talbot(a)talbotville.com> writes:
Alexandre Julliard wrote:
These are not part of a Win32 API structure, there's no reason they can't be made const.
Great. I shall submit a patch to declare all the string elements of Wine's MapiMessage type as LPCSTR.
No, MapiMessage is an SDK structure, what I mean is that the 'subject' and 'body' variables aren't. -- Alexandre Julliard julliard(a)winehq.org
I shall constify subject and body. BTW, the initialisation of address in MAPISendMail() is also a write-strings violation. But it appears that it is redirected before any use. So I shall remove its initialisation, too. Thanks, -- Andy.
participants (2)
-
Alexandre Julliard -
Andrew Talbot