PATCH: dlls/commdlg/printdlg.c add casts

Marcus Meissner marcus at jet.franken.de
Sat Jun 28 15:18:44 CDT 2003


On Sat, Jun 28, 2003 at 04:30:13PM +0100, Mike Hearn wrote:
> On Sat, 28 Jun 2003 09:46:35 +0200, Sir Gerald Pfeifer scribed thus:
> > The following patch to dlls/commdlg/printdlg.c
> > 
> >   revision 1.66
> >   date: 2003/06/27 22:21:06;  author: julliard;  state: Exp;  lines: +4 -7
> >   Mike Hearn <m.hearn at signal.qinetiq.com>
> >   Store PrintStructures in a window property instead of extra window bytes.
> > 
> > cause two new warnings
> > 
> >   printdlg.c:2056: warning: passing arg 2 of `GetPropW' from incompatible pointer type
> >   printdlg.c:2061: warning: passing arg 2 of `SetPropW' from incompatible pointer type
> 
> Odd, I don't remember getting those. Perhaps I just didn't notice. In
> future I'll try and remember to compile with -Werror before submitting.

> In this case I think it's mostly academic as the string doesn't have any
> non ANSI characters in it, but I think another solution might be to put an
> L before the string, so it becomes:
> 
> SetPropW(hDlg, L"__WINE_WHATEVER"....)

No, L"x" is not guaranteed to do the things you think it does.

(It will use 4 byte characters, depending on how gcc is configured
or if you use -fwchar-short or so.)

Ciao, Marcus



More information about the wine-devel mailing list