From 5450612a4d1bd4e6f796f76f12f3d216dfc935ba Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 7 Oct 2020 15:10:06 +0000 Subject: More warnings -Wshadow with C++ compiler. Simplify -> --- ChangeLog | 4 ++-- changes | 6 +++--- generic/tkCanvas.c | 4 ++-- generic/tkImgPNG.c | 4 ++-- generic/tkImgSVGnano.c | 6 +++--- generic/tkTest.c | 14 +++++++------- macosx/tkMacOSXScrlbr.c | 2 +- tests/bind.test | 20 ++++++++++---------- tests/imgPhoto.test | 2 +- win/tkWinMenu.c | 4 ++-- 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index f01946a..4fbb0eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -714,7 +714,7 @@ a better first place to look now. 2011-10-27 Kevin B. Kenny * generic/tkInt.h: [Bug 3410609]: Change the event mechanism - * unix/tkUnixEvent.c: for events to use the keysym + * unix/tkUnixEvent.c: for events to use the keysym * unix/tkUnixKey.c: returned by XLookupString in preference to the one that appears in the raw X event at any level. This change allows binding to ISO_Level3_Shift-ed characters, composed characters, @@ -5213,7 +5213,7 @@ a better first place to look now. 2008-01-29 Joe English - * library/treeview.tcl: Fix bug in Shift-ButtonPress-1 binding (error + * library/treeview.tcl: Fix bug in Shift-Button-1 binding (error if no current focus item; reported on c.l.t.) 2008-01-29 Donal K. Fellows diff --git a/changes b/changes index 61aff06..b83c642 100644 --- a/changes +++ b/changes @@ -333,7 +333,7 @@ same menu. 4/12/92 (bug fix) Fixed core dump that occurred in tkError.c when removing the first error record from the error list. -4/15/92 (bug fix) Fixed bug in tkBind.c that prevented +4/15/92 (bug fix) Fixed bug in tkBind.c that prevented event specifications from being processed correctly: the "1" was treated as a button name rather than a keysym. @@ -3998,7 +3998,7 @@ into account the "-displayof" option. This problem also existed for the command to the Mac. Also fixed "resource write" when the resource was specified by id and already existed. (JI) -9/16/97 (bug fix) Added null bindings to for the +9/16/97 (bug fix) Added null bindings to for the text and entry widget on the Macintosh. This prevents unbound command key sequences from having the character echoed to the widget. Also fixed Cut & Copy bindings. (JI) (RJ) @@ -7527,7 +7527,7 @@ in this changeset (new minor version) rather than bug fixes: 2018-01-07 (bug)[fa8de7] Crash [ttk::checkbutton .x -variable {}] (werner) -2018-01-16 (bug)[382712] Crash in [event generate . ] (werner) +2018-01-16 (bug)[382712] Crash in [event generate . ] (werner) 2018-01-19 (bug)[657c38] Crash in menu destroy with checkbutton entry (werner) diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 3bdfd00..3dd1403 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -852,7 +852,7 @@ CanvasWidgetCmd( "scan", "select", "type", "xview", "yview", NULL }; - enum options { + enum canvasOptionStringsEnum { CANV_ADDTAG, CANV_BBOX, CANV_BIND, CANV_CANVASX, CANV_CANVASY, CANV_CGET, CANV_CONFIGURE, CANV_COORDS, CANV_CREATE, CANV_DCHARS, CANV_DELETE, CANV_DTAG, @@ -876,7 +876,7 @@ CanvasWidgetCmd( Tcl_Preserve(canvasPtr); result = TCL_OK; - switch ((enum options)idx) { + switch ((enum canvasOptionStringsEnum)idx) { case CANV_ADDTAG: if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv, "tag searchCommand ?arg ...?"); diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c index 0e0e59c..c8b2125 100644 --- a/generic/tkImgPNG.c +++ b/generic/tkImgPNG.c @@ -2295,7 +2295,7 @@ ParseFormat( static const char *const fmtOptions[] = { "-alpha", NULL }; - enum fmtOptions { + enum fmtOptionsEnum { OPT_ALPHA }; @@ -2332,7 +2332,7 @@ ParseFormat( objc--; objv++; - switch ((enum fmtOptions) optIndex) { + switch ((enum fmtOptionsEnum) optIndex) { case OPT_ALPHA: if (Tcl_GetDoubleFromObj(interp, objv[0], &pngPtr->alpha) == TCL_ERROR) { diff --git a/generic/tkImgSVGnano.c b/generic/tkImgSVGnano.c index c18b181..4cdb648 100644 --- a/generic/tkImgSVGnano.c +++ b/generic/tkImgSVGnano.c @@ -336,7 +336,7 @@ ParseSVGWithOptions( static const char *const fmtOptions[] = { "-dpi", "-scale", "-scaletoheight", "-scaletowidth", NULL }; - enum fmtOptions { + enum fmtOptionsEnum { OPT_DPI, OPT_SCALE, OPT_SCALE_TO_HEIGHT, OPT_SCALE_TO_WIDTH }; @@ -394,7 +394,7 @@ ParseSVGWithOptions( /* * check that only one scale option is given */ - switch ((enum fmtOptions) optIndex) { + switch ((enum fmtOptionsEnum)optIndex) { case OPT_SCALE: case OPT_SCALE_TO_HEIGHT: case OPT_SCALE_TO_WIDTH: @@ -414,7 +414,7 @@ ParseSVGWithOptions( /* * Decode parameters */ - switch ((enum fmtOptions) optIndex) { + switch ((enum fmtOptionsEnum) optIndex) { case OPT_DPI: if (Tcl_GetDoubleFromObj(interp, objv[0], &dpi) == TCL_ERROR) { goto error; diff --git a/generic/tkTest.c b/generic/tkTest.c index 2622c9c..4347600 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -538,7 +538,7 @@ TestobjconfigObjCmd( * "chain2" subcommand: */ - typedef struct ExtensionWidgetRecord { + typedef struct { TrivialCommandHeader header; Tcl_Obj *base1ObjPtr; Tcl_Obj *base2ObjPtr; @@ -566,7 +566,7 @@ TestobjconfigObjCmd( switch (index) { case ALL_TYPES: { - typedef struct TypesRecord { + typedef struct { TrivialCommandHeader header; Tcl_Obj *booleanPtr; Tcl_Obj *integerPtr; @@ -784,7 +784,7 @@ TestobjconfigObjCmd( } case CONFIG_ERROR: { - typedef struct ErrorWidgetRecord { + typedef struct { Tcl_Obj *intPtr; } ErrorWidgetRecord; ErrorWidgetRecord widgetRecord; @@ -838,7 +838,7 @@ TestobjconfigObjCmd( * objects. */ - typedef struct InternalRecord { + typedef struct { TrivialCommandHeader header; int boolean; int integer; @@ -969,7 +969,7 @@ TestobjconfigObjCmd( } case NEW: { - typedef struct FiveRecord { + typedef struct { TrivialCommandHeader header; Tcl_Obj *one; Tcl_Obj *two; @@ -1028,7 +1028,7 @@ TestobjconfigObjCmd( break; } case NOT_ENOUGH_PARAMS: { - typedef struct NotEnoughRecord { + typedef struct { Tcl_Obj *fooObjPtr; } NotEnoughRecord; NotEnoughRecord record; @@ -1058,7 +1058,7 @@ TestobjconfigObjCmd( } case TWO_WINDOWS: { - typedef struct ContentRecord { + typedef struct { TrivialCommandHeader header; Tcl_Obj *windowPtr; } ContentRecord; diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 8483cbb..3149b15 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -662,7 +662,7 @@ UpdateControlValues( * * ScrollbarEvent -- * - * This procedure is invoked in response to , + * This procedure is invoked in response to