Fixed some warnings.

This commit is contained in:
Alexandre Julliard 2000-12-13 20:03:53 +00:00
parent 66b4468bd4
commit f6168db690
7 changed files with 18 additions and 16 deletions

View File

@ -70,7 +70,7 @@ STRING \"[^\n"]+\"
{DIGIT}+ { sscanf(yytext, "%d", &yylval.integer); return tNUM; }
<FORMAT_EXPECTED>"/"{DIGIT}+{FORMAT} { char* last;
yylval.integer = strtol( yytext+1, &last, NULL ) << 8;
yylval.integer = strtol( yytext+1, &last, 0 ) << 8;
yylval.integer |= *last;
return tFORMAT; }

View File

@ -281,7 +281,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
r.left +=3;
/* FIXME: (r.bottom- (infoPtr->himl->cy))/2 should horicontal center the image
It looks like it doesn't work as expected*/
ImageList_Draw (infoPtr->himl, phdi->iImage,hdc,r.left, (r.bottom- (infoPtr->himl->cy))/2,NULL);
ImageList_Draw (infoPtr->himl, phdi->iImage,hdc,r.left, (r.bottom- (infoPtr->himl->cy))/2,0);
r.left += infoPtr->himl->cx;
}

View File

@ -683,7 +683,7 @@ BSTR TLB_ReadName( TLBContext *pcx, int offset)
name[niName.namelen & 0xff]='\0';
lengthInChars = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED | MB_ERR_INVALID_CHARS,
name, -1, NULL, NULL);
name, -1, NULL, 0);
/* no invalid characters in string */
if (lengthInChars)
@ -717,7 +717,7 @@ BSTR TLB_ReadString( TLBContext *pcx, int offset)
string[length]='\0';
lengthInChars = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED | MB_ERR_INVALID_CHARS,
string, -1, NULL, NULL);
string, -1, NULL, 0);
/* no invalid characters in string */
if (lengthInChars)

View File

@ -458,7 +458,7 @@ BOOL WINAPI SERIALUI_SetDefaultCommConfig(
if(r == ERROR_SUCCESS)
{
dwDCBSize = sizeof (DCB);
r = RegSetValueExA( hKeyPort, lpszDCB, NULL, REG_BINARY,
r = RegSetValueExA( hKeyPort, lpszDCB, 0, REG_BINARY,
(LPSTR)&lpCommConfig->dcb,dwDCBSize);
TRACE("write key r=%ld\n",r);
RegCloseKey(hKeyPort);

View File

@ -305,10 +305,14 @@ INT WINAPI DeviceCapabilitiesA(LPCSTR pDevice,LPCSTR pPort, WORD cap,
/* If DC_PAPERSIZE map POINT16s to POINTs */
if(ret != -1 && cap == DC_PAPERSIZE && pOutput) {
POINT16 *tmp = HeapAlloc( GetProcessHeap(), 0, ret * sizeof(POINT16) );
POINT *pt = (POINT *)pOutput;
INT i;
memcpy(tmp, pOutput, ret * sizeof(POINT16));
for(i = 0; i < ret; i++)
CONV_POINT16TO32(tmp + i, (POINT*)pOutput + i);
for(i = 0; i < ret; i++, pt++)
{
pt->x = tmp[i].x;
pt->y = tmp[i].y;
}
HeapFree( GetProcessHeap(), 0, tmp );
}
return ret;
@ -680,11 +684,11 @@ static HKEY WINSPOOL_OpenDriverReg( LPVOID pEnvironment, BOOL unicode)
ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
if(!GetVersionExA( &ver))
return NULL;
return 0;
switch (ver.dwPlatformId) {
case VER_PLATFORM_WIN32s:
return NULL;
return 0;
case VER_PLATFORM_WIN32_NT:
p = "Windows NT x86";
break;
@ -703,7 +707,7 @@ static HKEY WINSPOOL_OpenDriverReg( LPVOID pEnvironment, BOOL unicode)
if(RegCreateKeyA(HKEY_LOCAL_MACHINE, lpKey, &retval) !=
ERROR_SUCCESS)
retval = NULL;
retval = 0;
if(pEnvironment && unicode)
HeapFree( GetProcessHeap(), 0, p);

View File

@ -589,7 +589,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
pPolyPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPolyPoly->cpts; i++)
CONV_POINT16TO32((POINTS*) (pPolyPoly->aPolyCounts +
CONV_POINT16TO32((POINT16*) (pPolyPoly->aPolyCounts +
pPolyPoly->nPolys) + i, pts + i);
PolyPolygon(hdc, pts, (INT*)pPolyPoly->aPolyCounts, pPolyPoly->nPolys);
@ -606,7 +606,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
pPolyPoly->cpts * sizeof(POINT) );
DWORD i;
for(i = 0; i < pPolyPoly->cpts; i++)
CONV_POINT16TO32((POINTS*) (pPolyPoly->aPolyCounts +
CONV_POINT16TO32((POINT16*) (pPolyPoly->aPolyCounts +
pPolyPoly->nPolys) + i, pts + i);
PolyPolyline(hdc, pts, pPolyPoly->aPolyCounts, pPolyPoly->nPolys);

View File

@ -25,8 +25,6 @@
#include "dce.h"
#include "nonclient.h"
#include "debugtools.h"
#include "local.h"
#include "ldt.h"
#include "input.h"
DEFAULT_DEBUG_CHANNEL(win);
@ -323,7 +321,7 @@ int WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL bRedraw )
/* Size the window to the rectangle of the new region
(if it isn't NULL) */
SetWindowPos( hwnd, NULL, tempRect.left, tempRect.top,
SetWindowPos( hwnd, 0, tempRect.left, tempRect.top,
tempRect.right - tempRect.left, tempRect.bottom - tempRect.top,
SWP_NOSIZE | SWP_FRAMECHANGED | SWP_NOMOVE |
SWP_NOZORDER | (bRedraw ? 0 : SWP_NOREDRAW) );
@ -335,7 +333,7 @@ int WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL bRedraw )
DeleteObject(wndPtr->hrgnWnd);
wndPtr->hrgnWnd = 0;
}
else if (hrgn == NULL)
else if (!hrgn)
{
/* if there was no previous region (stored in wndPtr->hrgnWnd) and
the region to be set is also NULL, there is nothing more to do