Updates to fix Watcom C/C++ 11.0 compiler warning problems. Now compiles

clean with this compiler. Hopefully I did this without breaking other
compilers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kendall Bennett
2001-05-02 19:48:15 +00:00
parent b1d1dc510d
commit 33ac7e6f01
93 changed files with 739 additions and 720 deletions

View File

@@ -88,7 +88,7 @@ HICON CursorToIcon( wxChar *szFileName, HINSTANCE hInst, int *W, int *H)
HANDLE ReadIcon( wxChar *szFileName, int *W, int *H)
{ ICONFILEHEADER iconFileHead; // ICON file header structure
ICONFILERES iconFileRes; // ICON file resource
WORD cbHead,
UINT cbHead,
cbRes,
cbBits; // Used for reading in file
int hFile; // File handle
@@ -175,7 +175,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H)
//* bitmaps. So, no need to convert the AND bitmask. *
//* 7) Since a DIB is stored upside down, flip the monochrome AND bits*
//* by scanlines. *
//* 8) Use the XOR and AND bits and create an icon with CreateIcon. *
//* 8) Use the XOR and AND bits and create an icon with CreateIcon. *
//*****************************************************************************
HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst)
@@ -253,8 +253,8 @@ HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst)
szFlip[(k - 1) - j] = *(DWORD FAR *)lpANDbits;
// 8) Use the XOR and AND bits and create an icon with CreateIcon.
hIcon = CreateIcon( hInst, bmpXor.bmWidth, bmpXor.bmHeight, bmpXor.bmPlanes,
bmpXor.bmBitsPixel, (const BYTE *)szFlip, (const BYTE *)lpXorDDB);
hIcon = CreateIcon( hInst, bmpXor.bmWidth, bmpXor.bmHeight, (BYTE)bmpXor.bmPlanes,
(BYTE)bmpXor.bmBitsPixel, (const BYTE *)szFlip, (const BYTE *)lpXorDDB);
// Clean up before exiting.
DeleteObject( hbmXor);
@@ -335,7 +335,7 @@ HCURSOR IconToCursor( wxChar *szFileName, HINSTANCE hInst, int XHot, int YHot,
HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H)
{ CURFILEHEADER curFileHead; // CURSOR file header structure
CURFILERES curFileRes; // CURSOR file resource
WORD cbHead,
UINT cbHead,
cbRes,
cbBits; // Used for reading in file
LPBITMAPINFO lpDIB; // Pointer to DIB memory
@@ -644,9 +644,9 @@ WORD PaletteSize( LPSTR pv)
NumColors = DIBNumColors((LPSTR )lpbi);
if(lpbi->biSize == sizeof( BITMAPCOREHEADER)) // OS/2 style DIBs
return NumColors * sizeof( RGBTRIPLE);
return (WORD)(NumColors * sizeof( RGBTRIPLE));
else
return NumColors * sizeof( RGBQUAD);
return (WORD)(NumColors * sizeof( RGBQUAD));
}
//*****************************************************************************
@@ -672,7 +672,7 @@ WORD DIBNumColors ( LPSTR pv)
// is in biClrUsed, whereas in the BITMAPCORE - style headers, it
// is dependent on the bits per pixel ( = 2 raised to the power of
// bits/pixel).
if(lpbi->biSize != sizeof( BITMAPCOREHEADER))
{
if(lpbi->biClrUsed != 0)
@@ -843,7 +843,7 @@ HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint)
/*
* This doesn't work: just gives us a grey square. Ideas, anyone?
*/
HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap)
{
HDC hDCColor, hDCMono;