more mingw32 warnings fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -162,27 +162,26 @@ int wxDibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi)
|
||||
|
||||
// write file header
|
||||
BITMAPFILEHEADER bmf;
|
||||
bmf.bfType = 'BM';
|
||||
bmf.bfType = BFT_BITMAP;
|
||||
bmf.bfSize = sizeof(bmf) + size;
|
||||
bmf.bfReserved1 = 0;
|
||||
bmf.bfReserved2 = 0;
|
||||
bmf.bfOffBits = sizeof(bmf) + (char FAR*)(wxDibPtr(lpbi)) - (char FAR*)lpbi;
|
||||
#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || defined(wxUSE_NORLANDER_HEADERS)
|
||||
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
|
||||
_hwrite(fh, (LPCSTR)lpbi, size)<0) {
|
||||
_lclose(fh);
|
||||
// printf("la regamos1");
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
if (_hwrite(fh, (LPBYTE)(&bmf), sizeof(bmf))<0 ||
|
||||
_hwrite(fh, (LPBYTE)lpbi, size)<0) {
|
||||
_lclose(fh);
|
||||
// printf("la regamos1");
|
||||
return 0;
|
||||
}
|
||||
#if 1 // defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || defined(wxUSE_NORLANDER_HEADERS)
|
||||
#define HWRITE_2ND_ARG_TYPE LPCSTR
|
||||
#else // don't know who needs this...
|
||||
#define HWRITE_2ND_ARG_TYPE LPBYTE
|
||||
#endif
|
||||
|
||||
if ( _hwrite(fh, (HWRITE_2ND_ARG_TYPE)(&bmf), sizeof(bmf)) < 0 ||
|
||||
_hwrite(fh, (HWRITE_2ND_ARG_TYPE)lpbi, size) < 0 )
|
||||
{
|
||||
_lclose(fh);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#undef HWRITE_2ND_ARG_TYPE
|
||||
|
||||
_lclose(fh);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user