warning while compiling with gcc3

Michael Cardenas michael.cardenas at lindows.com
Mon Apr 29 08:34:03 CDT 2002


This looks to me like it should  be changed to nil[1].

Why don't you try to make that change and see if it breaks anything?

Since it's in commonctl32, I'm assuming that it's used for clearing IP
address entry fields. You might want to try a windows version of telnet. 

Anyone know what application this function was written for?

On Fri, Apr 26, 2002 at 03:33:28PM +0200, Rizsanyi Zsolt wrote:
> Hi!
> 
> I have run into a warning, when compiling with gcc 3.1 (I dont know if it is 
> reported or not with 2.x gccs).
> And I think the warning is right.
> I dont think that the initializer of nil is right. It initializes an zero (0) 
> character length WCHAR array to a one character lenght array.
> 
> Or I just does not understand something?
> 
> Here is the code snippet from dlls/commctl32/ipaddress.c line 265:
> 
> static void IPADDRESS_ClearAddress (IPADDRESS_INFO *infoPtr)
> {
>     WCHAR nil[0] = { 0 };
>     int i;
> 
>     TRACE("\n");
> 
>     for (i = 0; i < 4; i++)
>         SetWindowTextW (infoPtr->Part[i].EditHwnd, nil);
> }
> 
> Best regards
> Zsolt Rizsanyi
> 
> 
> 
> 

-- 
michael cardenas
lead windows compatibility engineer
lindows.com

"Be the change you want to see in the world"
-Mahatma Gandhi





More information about the wine-devel mailing list