Permalink
Browse files

Remove an unused variable in dumpBMP.c

Fixes warnings with recent gcc
  • Loading branch information...
1 parent c42bc46 commit 690c205b7dd43986e4d41090f484c740f3a1a5e3 @igfoo igfoo committed Mar 16, 2012
Showing with 0 additions and 8 deletions.
  1. +0 −8 cbits/dumpBMP.c
View
@@ -38,7 +38,6 @@ void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC)
{
HANDLE hFile;
HBITMAP hTmpBmp, hBmpOld;
- BOOL bSuccess;
BITMAPFILEHEADER bfh;
LPBITMAPINFO pbmi;
PBYTE pBits;
@@ -48,7 +47,6 @@ void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC)
DWORD dwBytesWritten;
- bSuccess = TRUE;
#if 0
if (ghPal) {
SelectPalette(hDC, ghPal, FALSE);
@@ -112,7 +110,6 @@ void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC)
//
if ((pbmi = (LPBITMAPINFO)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, sizBMI )) == NULL) {
fprintf(stderr, "Failed in Memory Allocation for pbmi!");
- bSuccess = FALSE;
goto ErrExit1;
}
//
@@ -153,7 +150,6 @@ void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC)
//
if (WriteFile(hFile, (LPCVOID)&bfh, sizeof(BITMAPFILEHEADER), &dwBytesWritten, NULL) == -1) {
fprintf(stderr, "Failed in WriteFile!");
- bSuccess = FALSE;
goto ErrExit3;
}
@@ -167,12 +163,10 @@ void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC)
hBmpOld = SelectObject(hDC, hTmpBmp);
if ((GetDIBits(hDC, hBmp, 0, pbmi->bmiHeader.biHeight, (LPSTR)pBits, pbmi, DIB_RGB_COLORS))==0){
fprintf(stderr, "Failed in GetDIBits!");
- bSuccess = FALSE;
goto ErrExit4;
}
} else {
fprintf(stderr, "Failed in creating bitmap!");
- bSuccess = FALSE;
goto ErrExit3;
}
@@ -181,7 +175,6 @@ void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC)
//
if (WriteFile(hFile, (LPCVOID)pbmi, sizBMI, &dwBytesWritten, NULL) == -1) {
fprintf(stderr, "Failed in WriteFile!");
- bSuccess = FALSE;
goto ErrExit4;
}
@@ -190,7 +183,6 @@ void CreateBMPFile(LPCTSTR pszFileName, HBITMAP hBmp, HDC hDC)
//
if (WriteFile(hFile, (LPCVOID)pBits, pbmi->bmiHeader.biSizeImage, &dwBytesWritten, NULL) == -1) {
fprintf(stderr, "Failed in WriteFile!");
- bSuccess = FALSE;
goto ErrExit4;
}

0 comments on commit 690c205

Please sign in to comment.