From 60f8543362fa5f3671b1e6513a16570f761eac3a Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 5 Jul 2005 14:11:04 +0000 Subject: [PATCH] gcc 4.0 -Wpointer-sign fixes. --- dlls/commdlg/filedlg.c | 4 ++-- dlls/commdlg/filedlgbrowser.c | 2 +- dlls/commdlg/fontdlg.c | 6 ++++-- dlls/commdlg/fontdlg16.c | 4 ++-- dlls/commdlg/printdlg.c | 6 +++--- dlls/commdlg/printdlg16.c | 2 +- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c index 2a4ec28e309..3a727de9582 100644 --- a/dlls/commdlg/filedlg.c +++ b/dlls/commdlg/filedlg.c @@ -850,7 +850,7 @@ void SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) static INT_PTR FILEDLG95_Handle_GetFilePath(HWND hwnd, DWORD size, LPVOID buffer) { - INT_PTR sizeUsed = 0, n, total; + UINT sizeUsed = 0, n, total; LPWSTR lpstrFileList = NULL; WCHAR lpstrCurrentDir[MAX_PATH]; FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); @@ -912,7 +912,7 @@ static INT_PTR FILEDLG95_Handle_GetFilePath(HWND hwnd, DWORD size, LPVOID buffer static INT_PTR FILEDLG95_Handle_GetFileSpec(HWND hwnd, DWORD size, LPVOID buffer) { - INT_PTR sizeUsed = 0; + UINT sizeUsed = 0; LPWSTR lpstrFileList = NULL; FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c index 529f314efc1..dd0b54295b6 100644 --- a/dlls/commdlg/filedlgbrowser.c +++ b/dlls/commdlg/filedlgbrowser.c @@ -50,7 +50,7 @@ typedef struct const IShellBrowserVtbl *lpVtbl; const ICommDlgBrowserVtbl *lpVtblCommDlgBrowser; const IServiceProviderVtbl *lpVtblServiceProvider; - DWORD ref; /* Reference counter */ + LONG ref; /* Reference counter */ HWND hwndOwner; /* Owner dialog of the interface */ } IShellBrowserImpl; diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c index 401af2f3641..407ee3dcf12 100644 --- a/dlls/commdlg/fontdlg.c +++ b/dlls/commdlg/fontdlg.c @@ -722,11 +722,13 @@ LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam) HFONT hfontprev; TEXTMETRICW tm; LPMEASUREITEMSTRUCT lpmi=(LPMEASUREITEMSTRUCT)lParam; + INT height = 0; + if (!himlTT) himlTT = ImageList_LoadImageW( COMDLG32_hInstance, MAKEINTRESOURCEW(38), TTBITMAP_XSIZE, 0, CLR_DEFAULT, IMAGE_BITMAP, 0); - ImageList_GetIconSize( himlTT, 0, &lpmi->itemHeight); - lpmi->itemHeight += 2; + ImageList_GetIconSize( himlTT, 0, &height); + lpmi->itemHeight = height + 2; /* use MAX of bitmap height and tm.tmHeight .*/ hdc=GetDC(hDlg); if(!hdc) return 0; diff --git a/dlls/commdlg/fontdlg16.c b/dlls/commdlg/fontdlg16.c index 84a51e929b4..d80e75ca6bb 100644 --- a/dlls/commdlg/fontdlg16.c +++ b/dlls/commdlg/fontdlg16.c @@ -74,14 +74,14 @@ static void CFn_CHOOSEFONT16to32W(LPCHOOSEFONT16 chf16, LPCHOOSEFONTW chf32w) int len; if(chf16->lpTemplateName) { - len = MultiByteToWideChar(CP_ACP, 0, (LPBYTE)chf16->lpTemplateName, -1, NULL, 0); + len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)chf16->lpTemplateName, -1, NULL, 0); chf32w->lpTemplateName = HeapAlloc(GetProcessHeap(), 0,len*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, (LPSTR)MapSL(chf16->lpTemplateName), -1, (LPWSTR)chf32w->lpTemplateName, len); } if(chf16->lpszStyle) { - len = MultiByteToWideChar(CP_ACP, 0, (LPBYTE)chf16->lpszStyle, -1, NULL, 0); + len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)chf16->lpszStyle, -1, NULL, 0); chf32w->lpszStyle = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, (LPSTR)MapSL(chf16->lpTemplateName), -1, chf32w->lpszStyle, len); diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c index 104d31e8cc9..dd56519bc65 100644 --- a/dlls/commdlg/printdlg.c +++ b/dlls/commdlg/printdlg.c @@ -473,7 +473,7 @@ static BOOL PRINTDLG_PaperSizeA( goto out; } points = HeapAlloc(GetProcessHeap(),0,sizeof(points[0])*NrOfEntries); - if (NrOfEntries!=(ret=DeviceCapabilitiesA(devname,portname,DC_PAPERSIZE,(LPBYTE)points,dm))) { + if (NrOfEntries!=(ret=DeviceCapabilitiesA(devname,portname,DC_PAPERSIZE,(LPSTR)points,dm))) { FIXME("Number of returned sizes %d is not %d?\n",NrOfEntries,ret); goto out; } @@ -898,7 +898,7 @@ BOOL PRINTDLG_ChangePrinterA(HWND hDlg, char *name, dmSize = DocumentPropertiesA(0, 0, name, PrintStructures->lpDevMode, NULL, DM_OUT_BUFFER); if(lppd->hDevMode && (lpdm = GlobalLock(lppd->hDevMode)) && - !strcmp(lpdm->dmDeviceName, + !lstrcmpA(lpdm->dmDeviceName, PrintStructures->lpDevMode->dmDeviceName)) { /* Supplied devicemode matches current printer so try to use it */ DocumentPropertiesA(0, 0, name, PrintStructures->lpDevMode, lpdm, @@ -1241,7 +1241,7 @@ static LRESULT PRINTDLG_WMInitDialog(HWND hDlg, WPARAM wParam, if(pdn) name = (char*)pdn + pdn->wDeviceOffset; else if(pdm) - name = pdm->dmDeviceName; + name = (char*)pdm->dmDeviceName; PRINTDLG_SetUpPrinterListComboA(hDlg, comboID, name); if(pdm) GlobalUnlock(lppd->hDevMode); if(pdn) GlobalUnlock(lppd->hDevNames); diff --git a/dlls/commdlg/printdlg16.c b/dlls/commdlg/printdlg16.c index 0f665e74072..21046c40a67 100644 --- a/dlls/commdlg/printdlg16.c +++ b/dlls/commdlg/printdlg16.c @@ -192,7 +192,7 @@ static LRESULT PRINTDLG_WMInitDialog16(HWND hDlg, WPARAM wParam, PRINT_PTRA16* p if(pdn) name = (char*)pdn + pdn->wDeviceOffset; else if(pdm) - name = pdm->dmDeviceName; + name = (char*)pdm->dmDeviceName; PRINTDLG_SetUpPrinterListComboA(hDlg, comboID, name); if(pdm) GlobalUnlock16(lppd->hDevMode); if(pdn) GlobalUnlock16(lppd->hDevNames); -- 2.11.4.GIT