diff options
author | nijtmans <nijtmans> | 2008-11-27 23:26:05 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2008-11-27 23:26:05 (GMT) |
commit | f5fd423e9bc812dfa0e60cc9da7aaeb7d9b86284 (patch) | |
tree | 20d24307a579f0fe7d3afb9b67a418e01a00c083 | |
parent | c44ff57c146d5dc3a790dc6c3e58f021f4d31531 (diff) | |
download | tk-f5fd423e9bc812dfa0e60cc9da7aaeb7d9b86284.zip tk-f5fd423e9bc812dfa0e60cc9da7aaeb7d9b86284.tar.gz tk-f5fd423e9bc812dfa0e60cc9da7aaeb7d9b86284.tar.bz2 |
elminate warning: unused variable 'tkwin'
Replace Tcl_SetResult(interp, NULL, ....) calls
with Tcl_ResetResult(interp) everywhere
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tkCanvLine.c | 46 | ||||
-rw-r--r-- | generic/tkEntry.c | 12 | ||||
-rw-r--r-- | generic/tkMenu.c | 6 | ||||
-rw-r--r-- | generic/tkOldConfig.c | 4 | ||||
-rw-r--r-- | win/tkWinTest.c | 5 |
6 files changed, 43 insertions, 38 deletions
@@ -1,3 +1,11 @@ +2008-11-27 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tkCanvLine.c: Replace Tcl_SetResult(interp, NULL, ....) + * generic/tkEntry.c calls with Tcl_ResetResult(interp) + * generic/tkMenu.c + * generic/tkOldConfig.c + * win/tkWinTest.c: eliminate warning: unused variable 'tkwin' + 2008-11-23 Pat Thoyts <patthoyts@users.sourceforge.net> * generic/tkBind.c: [Bug 1389270] event generate silently ignored diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 209076d..6abb362 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvLine.c,v 1.26 2008/11/09 21:53:39 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvLine.c,v 1.27 2008/11/27 23:26:05 nijtmans Exp $ */ #include <stdio.h> @@ -251,7 +251,7 @@ Tk_ItemType tkLineType = { */ #define MAX_STATIC_POINTS 200 - + /* *-------------------------------------------------------------- * @@ -332,7 +332,7 @@ CreateLine( DeleteLine(canvas, itemPtr, Tk_Display(Tk_CanvasTkwin(canvas))); return TCL_ERROR; } - + /* *-------------------------------------------------------------- * @@ -444,7 +444,7 @@ LineCoords( } return TCL_OK; } - + /* *-------------------------------------------------------------- * @@ -586,7 +586,7 @@ ConfigureLine( return TCL_OK; } - + /* *-------------------------------------------------------------- * @@ -626,7 +626,7 @@ DeleteLine( ckfree((char *) linePtr->lastArrowPtr); } } - + /* *-------------------------------------------------------------- * @@ -810,7 +810,7 @@ ComputeLineBbox( linePtr->header.y1 -= 1; linePtr->header.y2 += 1; } - + /* *-------------------------------------------------------------- * @@ -935,7 +935,7 @@ DisplayLine( XSetTSOrigin(display, linePtr->arrowGC, 0, 0); } } - + /* *-------------------------------------------------------------- * @@ -1128,7 +1128,7 @@ LineInsert( ComputeLineBbox(canvas, linePtr); } - + /* *-------------------------------------------------------------- * @@ -1303,7 +1303,7 @@ LineDeleteCoords( } ComputeLineBbox(canvas, linePtr); } - + /* *-------------------------------------------------------------- * @@ -1534,7 +1534,7 @@ LineToPoint( } return bestDist; } - + /* *-------------------------------------------------------------- * @@ -1657,7 +1657,7 @@ LineToArea( } return result; } - + /* *-------------------------------------------------------------- * @@ -1720,7 +1720,7 @@ ScaleLine( } ComputeLineBbox(canvas, linePtr); } - + /* *-------------------------------------------------------------- * @@ -1764,7 +1764,7 @@ GetLineIndex( */ badIndex: - Tcl_SetResult(interp, NULL, TCL_STATIC); + Tcl_ResetResult(interp); Tcl_AppendResult(interp, "bad index \"", string, "\"", NULL); return TCL_ERROR; } @@ -1807,7 +1807,7 @@ GetLineIndex( } return TCL_OK; } - + /* *-------------------------------------------------------------- * @@ -1857,7 +1857,7 @@ TranslateLine( } ComputeLineBbox(canvas, linePtr); } - + /* *-------------------------------------------------------------- * @@ -1924,7 +1924,7 @@ ParseArrowShape( ckfree((char *) argv); return TCL_OK; } - + /* *-------------------------------------------------------------- * @@ -1961,7 +1961,7 @@ PrintArrowShape( *freeProcPtr = TCL_DYNAMIC; return buffer; } - + /* *-------------------------------------------------------------- * @@ -2024,7 +2024,7 @@ ArrowParseProc( *arrowPtr = ARROWS_NONE; return TCL_ERROR; } - + /* *-------------------------------------------------------------- * @@ -2069,7 +2069,7 @@ ArrowPrintProc( return "none"; } } - + /* *-------------------------------------------------------------- * @@ -2229,7 +2229,7 @@ ConfigureArrows( return TCL_OK; } - + /* *-------------------------------------------------------------- * @@ -2404,7 +2404,7 @@ LineToPostscript( } return TCL_OK; } - + /* *-------------------------------------------------------------- * @@ -2463,7 +2463,7 @@ ArrowheadPostscript( } return TCL_OK; } - + /* * Local Variables: * mode: c diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 498b277..aae87dc 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEntry.c,v 1.55 2008/11/08 22:52:29 dkf Exp $ + * RCS: @(#) $Id: tkEntry.c,v 1.56 2008/11/27 23:26:05 nijtmans Exp $ */ #include "tkInt.h" @@ -2528,7 +2528,7 @@ GetEntryIndex( break; case 's': if (entryPtr->selectFirst < 0) { - Tcl_SetResult(interp, NULL, TCL_STATIC); + Tcl_ResetResult(interp); Tcl_AppendResult(interp, "selection isn't in widget ", Tk_PathName(entryPtr->tkwin), NULL); return TCL_ERROR; @@ -2942,7 +2942,7 @@ EntryUpdateScrollbar( Tcl_AddErrorInfo(interp, ")"); Tcl_BackgroundError(interp); } - Tcl_SetResult(interp, NULL, TCL_STATIC); + Tcl_ResetResult(interp); Tcl_Release(interp); } @@ -3157,11 +3157,11 @@ EntryValidate( Tcl_AddErrorInfo(interp, "\nvalid boolean not returned by validation command"); Tcl_BackgroundError(interp); - Tcl_SetResult(interp, NULL, 0); + Tcl_ResetResult(interp); return TCL_ERROR; } - Tcl_SetResult(interp, NULL, 0); + Tcl_ResetResult(interp); return (bool ? TCL_OK : TCL_BREAK); } @@ -4292,7 +4292,7 @@ SpinboxInvoke( return TCL_OK; } - Tcl_SetResult(interp, NULL, 0); + Tcl_ResetResult(interp); } return TCL_OK; diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 646f07e..93726c8 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.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: tkMenu.c,v 1.47 2008/11/08 22:52:29 dkf Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.48 2008/11/27 23:26:05 nijtmans Exp $ */ /* @@ -2154,7 +2154,7 @@ TkGetMenuIndex( *indexPtr = i; goto success; } - Tcl_SetResult(interp, NULL, TCL_STATIC); + Tcl_ResetResult(interp); } for (i = 0; i < menuPtr->numEntries; i++) { @@ -2956,7 +2956,7 @@ GetIndexFromCoords( return TCL_OK; error: - Tcl_SetResult(interp, NULL, TCL_STATIC); + Tcl_ResetResult(interp); return TCL_ERROR; } diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index 731944d..a8cc050 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkOldConfig.c,v 1.27 2008/11/18 23:49:43 nijtmans Exp $ + * RCS: @(#) $Id: tkOldConfig.c,v 1.28 2008/11/27 23:26:05 nijtmans Exp $ */ #include "tkPort.h" @@ -626,7 +626,7 @@ Tk_ConfigureInfo( * handle that one spec specially. */ - Tcl_SetResult(interp, NULL, TCL_STATIC); + Tcl_ResetResult(interp); if (argvName != NULL) { specPtr = FindConfigSpec(interp, specs, argvName, needFlags,hateFlags); if (specPtr == NULL) { diff --git a/win/tkWinTest.c b/win/tkWinTest.c index 14f32ce..c48dba5 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinTest.c,v 1.22 2008/11/22 01:07:56 patthoyts Exp $ + * RCS: @(#) $Id: tkWinTest.c,v 1.23 2008/11/27 23:26:05 nijtmans Exp $ */ #include "tkWinInt.h" @@ -39,7 +39,6 @@ static int TestwinlocaleObjCmd(ClientData clientData, MODULE_SCOPE int TkplatformtestInit(Tcl_Interp *interp); static Tk_GetSelProc SetSelectionResult; - /* *---------------------------------------------------------------------- * @@ -480,8 +479,6 @@ TestwinlocaleObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - Tk_Window tkwin = (Tk_Window) clientData; - if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; |