diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-01-12 10:41:23 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-01-12 10:41:23 (GMT) |
commit | 6c75da00b675108a826e392e827698d4eeb5e4cf (patch) | |
tree | ef82d8fda6efa38bb2958e9d9816fd6f4b4eedbf /win/tkWinImage.c | |
parent | 32d9b2358c24a7c31ab8662b3c8d91dd932dbde0 (diff) | |
download | tk-6c75da00b675108a826e392e827698d4eeb5e4cf.zip tk-6c75da00b675108a826e392e827698d4eeb5e4cf.tar.gz tk-6c75da00b675108a826e392e827698d4eeb5e4cf.tar.bz2 |
More warning squelching (mostly uninit variable warnings)
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; |