httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: cvs commit: httpd-2.0/support/win32 ApacheMonitor.c
Date Wed, 06 Oct 2004 14:06:28 GMT
On Wed, 06 Oct 2004 15:52:43 +0200, Mladen Turk <mturk@apache.org> wrote:
> 
> 
> ake@apache.org wrote:
> > ake         2004/10/06 06:33:29
> >
> >   Modified:    modules/arch/win32 mod_win32.c
> >                server/mpm/winnt service.c
> >                support/win32 ApacheMonitor.c
> >   Log:
> >   WIN64: fix some windows specific 64bit warnings
> >
> >   -    if (!WriteConsole(hConErr, msg, strlen(msg), &result, NULL) || !result)
> >   +    if (!WriteConsole(hConErr, msg, (int)strlen(msg), &result, NULL) || !result)
> >   -        if (!WriteConsole(hConErr, count, strlen(count), &result, NULL)
> >   +        if (!WriteConsole(hConErr, count, (int)strlen(count), &result, NULL)
> >   -            lstrcpyn(szBuf, szImagePath, sPos - szImagePath);
> >   +            lstrcpyn(szBuf, szImagePath, (int)(sPos - szImagePath));
> >   -            TextOut(lpdis->hDC, XBITMAP + 6, y, szBuf, strlen(szBuf));
> >   +            TextOut(lpdis->hDC, XBITMAP + 6, y, szBuf, (int)strlen(szBuf));
> 
> Please do not do that any more. I'm sorry but I'm vetoing your patches.
> Use the official API, it is well documented.

strlen() returns size_t, TextOut() requires int; somewhere a cast is
required, no?  what is a better solution?

Mime
View raw message