summaryrefslogtreecommitdiffstats
path: root/win/tkWinImage.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2007-01-12 10:41:23 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2007-01-12 10:41:23 (GMT)
commit61131ef482979e5e5bd5fe298771e734efb9312b (patch)
treeef82d8fda6efa38bb2958e9d9816fd6f4b4eedbf /win/tkWinImage.c
parent7b4182537e13cc67a54c84fa013a3387f6e932ea (diff)
downloadtk-61131ef482979e5e5bd5fe298771e734efb9312b.zip
tk-61131ef482979e5e5bd5fe298771e734efb9312b.tar.gz
tk-61131ef482979e5e5bd5fe298771e734efb9312b.tar.bz2
More warning squelching (mostly uninit variable warnings)
Diffstat (limited to 'win/tkWinImage.c')
-rw-r--r--win/tkWinImage.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/win/tkWinImage.c b/win/tkWinImage.c
index dbced49..37e4351 100644
--- a/win/tkWinImage.c
+++ b/win/tkWinImage.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinImage.c,v 1.10 2007/01/11 15:35:40 dkf Exp $
+ * RCS: @(#) $Id: tkWinImage.c,v 1.11 2007/01/12 10:41:23 dkf Exp $
*/
#include "tkWinInt.h"
@@ -294,7 +294,7 @@ XGetImageZPixmap(
HDC hdc, hdcMem;
HBITMAP hbmp, hbmpPrev;
BITMAPINFO *bmInfo = NULL;
- HPALETTE hPal, hPalPrev1, hPalPrev2;
+ HPALETTE hPal, hPalPrev1 = 0, hPalPrev2 = 0;
int size;
unsigned int n;
unsigned int depth;
@@ -323,12 +323,12 @@ XGetImageZPixmap(
hPalPrev1 = SelectPalette(hdcMem, hPal, FALSE);
n = RealizePalette(hdcMem);
if (n > 0) {
- UpdateColors (hdcMem);
+ UpdateColors(hdcMem);
}
hPalPrev2 = SelectPalette(hdc, hPal, FALSE);
n = RealizePalette(hdc);
if (n > 0) {
- UpdateColors (hdc);
+ UpdateColors(hdc);
}
}
@@ -339,6 +339,7 @@ XGetImageZPixmap(
SelectObject(hdcMem, hbmpPrev);
TkWinReleaseDrawableDC(d, hdc, &state);
if (ret == FALSE) {
+ ret_image = NULL;
goto cleanup;
}
if (twdPtr->type == TWD_WINDOW) {
@@ -454,7 +455,7 @@ XGetImageZPixmap(
*/
if (GetDIBits(hdcMem, hbmp, 0, height, ret_image->data, bmInfo,
- DIB_RGB_COLORS) == 0) {
+ DIB_RGB_COLORS) == 0) {
ckfree((char *) ret_image->data);
ckfree((char *) ret_image);
ret_image = NULL;