diff options
author | dkf <dkf@noemail.net> | 2007-01-12 10:41:22 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2007-01-12 10:41:22 (GMT) |
commit | 4b2a855fe1cfd6c493dcafc2365f94b45223f3bf (patch) | |
tree | ef82d8fda6efa38bb2958e9d9816fd6f4b4eedbf /win/tkWinImage.c | |
parent | 1ccaacc22af99e2eefb9ab1138397dc5022bcfba (diff) | |
download | tk-4b2a855fe1cfd6c493dcafc2365f94b45223f3bf.zip tk-4b2a855fe1cfd6c493dcafc2365f94b45223f3bf.tar.gz tk-4b2a855fe1cfd6c493dcafc2365f94b45223f3bf.tar.bz2 |
More warning squelching (mostly uninit variable warnings)
FossilOrigin-Name: 17ca9d3acb56f73c215e68dd2e2fb44e087b6fb8
Diffstat (limited to 'win/tkWinImage.c')
-rw-r--r-- | win/tkWinImage.c | 11 |
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; |