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/tkWinWm.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/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 4118b17..6eddb59 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.112 2007/01/11 15:35:41 dkf Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.113 2007/01/12 10:41:23 dkf Exp $ */ #include "tkWinInt.h" @@ -2600,6 +2600,8 @@ TkpWmSetState( cmd = SW_SHOWNOACTIVATE; } else if (state == ZoomState) { cmd = SW_SHOWMAXIMIZED; + } else { + return; } ShowWindow(wmPtr->wrapper, cmd); @@ -3146,7 +3148,7 @@ WmAttributesCmd( Tcl_Obj *CONST objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; - LONG style, exStyle, styleBit, *stylePtr; + LONG style, exStyle, styleBit, *stylePtr = NULL; char *string; int i, boolean, length; int config_fullscreen = 0; @@ -5209,8 +5211,9 @@ WmStateCmd( } if (winPtr->flags & TK_EMBEDDED) { - int state; - switch(index) { + int state = 0; + + switch (index) { case OPT_NORMAL: state = NormalState; break; @@ -5223,9 +5226,11 @@ WmStateCmd( case OPT_ZOOMED: state = ZoomState; break; + default: + Tcl_Panic("unexpected index"); } - if(state+1 != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) { + if (state+1 != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) { Tcl_AppendResult(interp, "can't change state of ", winPtr->pathName, ": the container does not support the request", NULL); @@ -7020,6 +7025,7 @@ ConfigureTopLevel( state = IconicState; break; case SW_SHOWNORMAL: + default: state = NormalState; break; } |