summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-06 06:37:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-06 06:37:43 (GMT)
commit07160023530295009919bcf063e260bfaebe9851 (patch)
tree284c5d2aea3f4504edd3da311d2b2dc4f98e90bd
parent5e7c6982ce66c388008bd5a81fac55fbf5b900da (diff)
parentcaa253fcf5871c9886ed214cfc4d68c5ab45d8f2 (diff)
downloadtk-07160023530295009919bcf063e260bfaebe9851.zip
tk-07160023530295009919bcf063e260bfaebe9851.tar.gz
tk-07160023530295009919bcf063e260bfaebe9851.tar.bz2
Merge 8.6. Fix some more -Wshadow warnings
-rw-r--r--generic/nanosvg.h8
-rw-r--r--generic/tkCanvLine.c2
-rw-r--r--generic/tkCanvas.c18
-rw-r--r--generic/tkImgPhInstance.c12
-rw-r--r--generic/tkImgPhoto.h13
-rw-r--r--tests/text.test8
-rw-r--r--unix/tkUnixScale.c4
-rw-r--r--unix/tkUnixSend.c12
-rw-r--r--unix/tkUnixWm.c96
-rw-r--r--win/tkWinSendCom.c4
10 files changed, 66 insertions, 111 deletions
diff --git a/generic/nanosvg.h b/generic/nanosvg.h
index 3f9548b..768dd20 100644
--- a/generic/nanosvg.h
+++ b/generic/nanosvg.h
@@ -284,7 +284,7 @@ static void nsvg__parseElement(char* s,
{
const char* attr[NSVG_XML_MAX_ATTRIBS];
int nattr = 0;
- char* name;
+ char* cbname;
int start = 0;
int end = 0;
char quote;
@@ -305,7 +305,7 @@ static void nsvg__parseElement(char* s,
return;
// Get tag name
- name = s;
+ cbname = s;
while (*s && !nsvg__isspace(*s)) s++;
if (*s) { *s++ = '\0'; }
@@ -348,9 +348,9 @@ static void nsvg__parseElement(char* s,
// Call callbacks.
if (start && startelCb)
- (*startelCb)(ud, name, attr);
+ (*startelCb)(ud, cbname, attr);
if (end && endelCb)
- (*endelCb)(ud, name);
+ (*endelCb)(ud, cbname);
}
NANOSVG_SCOPE
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 28764d8..378e6ed 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -834,7 +834,7 @@ DisplayLine(
Display *display, /* Display on which to draw item. */
Drawable drawable, /* Pixmap or window in which to draw item. */
TCL_UNUSED(int), /* Describes region of canvas that must be */
- TCL_UNUSED(int), /* redisplayed (not used). */
+ TCL_UNUSED(int), /* redisplayed (not used). */
TCL_UNUSED(int),
TCL_UNUSED(int))
{
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 0550fbe..3bdfd00 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -839,8 +839,8 @@ CanvasWidgetCmd(
TagSearch *searchPtr = NULL;/* Allocated by first TagSearchScan, freed by
* TagSearchDestroy */
- int index;
- static const char *const optionStrings[] = {
+ int idx;
+ static const char *const canvasOptionStrings[] = {
"addtag", "bbox", "bind", "canvasx",
"canvasy", "cget", "configure", "coords",
"create", "dchars", "delete", "dtag",
@@ -869,14 +869,14 @@ CanvasWidgetCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(interp, objv[1], canvasOptionStrings, "option", 0,
+ &idx) != TCL_OK) {
return TCL_ERROR;
}
Tcl_Preserve(canvasPtr);
result = TCL_OK;
- switch ((enum options)index) {
+ switch ((enum options)idx) {
case CANV_ADDTAG:
if (objc < 4) {
Tcl_WrongNumArgs(interp, 2, objv, "tag searchCommand ?arg ...?");
@@ -1925,10 +1925,10 @@ CanvasWidgetCmd(
Tcl_WrongNumArgs(interp, 2, objv, "mark|dragto x y ?dragGain?");
result = TCL_ERROR;
} else if (Tcl_GetIndexFromObj(interp, objv[2], optionStrings,
- "scan option", 0, &index) != TCL_OK) {
+ "scan option", 0, &idx) != TCL_OK) {
result = TCL_ERROR;
- } else if ((objc != 5) && (objc != 5+index)) {
- Tcl_WrongNumArgs(interp, 3, objv, index?"x y ?gain?":"x y");
+ } else if ((objc != 5) && (objc != 5+idx)) {
+ Tcl_WrongNumArgs(interp, 3, objv, idx?"x y ?gain?":"x y");
result = TCL_ERROR;
} else if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK)
|| (Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)){
@@ -1936,7 +1936,7 @@ CanvasWidgetCmd(
} else if ((objc == 6) &&
(Tcl_GetIntFromObj(interp, objv[5], &gain) != TCL_OK)) {
result = TCL_ERROR;
- } else if (!index) {
+ } else if (!idx) {
canvasPtr->scanX = x;
canvasPtr->scanXOrigin = canvasPtr->xOrigin;
canvasPtr->scanY = y;
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index 11dc251..55cc226 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -44,7 +44,7 @@ static void BlendComplexAlpha(XImage *bgImg, PhotoInstance *iPtr,
#endif
static int IsValidPalette(PhotoInstance *instancePtr,
const char *palette);
-static int CountBits(pixel mask);
+static int CountBits(unsigned mask);
static void GetColorTable(PhotoInstance *instancePtr);
static void FreeColorTable(ColorTable *colorPtr, int force);
static void AllocateColors(ColorTable *colorPtr);
@@ -999,7 +999,7 @@ IsValidPalette(
static int
CountBits(
- pixel mask) /* Value to count the 1 bits in. */
+ unsigned mask) /* Value to count the 1 bits in. */
{
int n;
@@ -1649,7 +1649,7 @@ TkImgDitherInstance(
int bitsPerPixel, bytesPerLine, lineLength;
unsigned char *srcLinePtr;
schar *errLinePtr;
- pixel firstBit, word, mask;
+ unsigned firstBit, word, mask;
/*
* Turn dithering off in certain cases where it is not needed (TrueColor,
@@ -1722,7 +1722,7 @@ TkImgDitherInstance(
unsigned char *srcPtr = srcLinePtr;
schar *errPtr = errLinePtr;
unsigned char *destBytePtr = dstLinePtr;
- pixel *destLongPtr = (pixel *) dstLinePtr;
+ unsigned *destLongPtr = (unsigned *) dstLinePtr;
if (colorPtr->flags & COLOR_WINDOW) {
/*
@@ -1813,7 +1813,7 @@ TkImgDitherInstance(
* sizes.
*/
- case NBBY * sizeof(pixel):
+ case NBBY * sizeof(unsigned):
*destLongPtr++ = i;
break;
#endif
@@ -1875,7 +1875,7 @@ TkImgDitherInstance(
* sizes.
*/
- case NBBY * sizeof(pixel):
+ case NBBY * sizeof(unsigned):
*destLongPtr++ = i;
break;
#endif
diff --git a/generic/tkImgPhoto.h b/generic/tkImgPhoto.h
index e65893f..d7283b3 100644
--- a/generic/tkImgPhoto.h
+++ b/generic/tkImgPhoto.h
@@ -50,13 +50,6 @@ typedef struct PhotoModel PhotoModel;
#endif
/*
- * An unsigned 32-bit integral type, used for pixel values. We use int rather
- * than long here to accommodate those systems where longs are 64 bits.
- */
-
-typedef unsigned int pixel;
-
-/*
* The maximum number of pixels to transmit to the server in a single
* XPutImage call.
*/
@@ -110,10 +103,10 @@ struct ColorTable {
XVisualInfo visualInfo; /* Information about the visual for windows
* using this color table. */
- pixel redValues[256]; /* Maps 8-bit values of red intensity to a
+ unsigned redValues[256]; /* Maps 8-bit values of red intensity to a
* pixel value or index in pixelMap. */
- pixel greenValues[256]; /* Ditto for green intensity. */
- pixel blueValues[256]; /* Ditto for blue intensity. */
+ unsigned greenValues[256]; /* Ditto for green intensity. */
+ unsigned blueValues[256]; /* Ditto for blue intensity. */
unsigned long *pixelMap; /* Actual pixel values allocated. */
unsigned char colorQuant[3][256];
diff --git a/tests/text.test b/tests/text.test
index d830dc2..df2769e 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -5078,11 +5078,11 @@ test text-22.132 {TextSearchCmd, multiline regexp matching} -body {
void
Tcl_SetObjLength(objPtr, length)
- register Tcl_Obj *objPtr; /* Pointer to object. This object must
- * not currently be shared. */
- register int length; /* Number of bytes desired for string
+ Tcl_Obj *objPtr; /* Pointer to object. This object must
+ * not currently be shared. */
+ int length; /* Number of bytes desired for string
* representation of object, not including
- * terminating null byte. */
+ * terminating null byte. */
\{
char *new;
}
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c
index 1b4fefe..a603432 100644
--- a/unix/tkUnixScale.c
+++ b/unix/tkUnixScale.c
@@ -50,10 +50,8 @@ static void DisplayVerticalValue(TkScale *scalePtr,
TkScale *
TkpCreateScale(
- Tk_Window tkwin)
+ TCL_UNUSED(Tk_Window))
{
- (void)tkwin;
-
return (TkScale *)ckalloc(sizeof(TkScale));
}
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index 6cf711c..92fd8bb 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -943,7 +943,7 @@ Tk_SetAppName(
int
Tk_SendObjCmd(
- ClientData dummy, /* Information about sender (only dispPtr
+ TCL_UNUSED(void *), /* Information about sender (only dispPtr
* field is used). */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -971,7 +971,6 @@ Tk_SendObjCmd(
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
Tcl_Interp *localInterp; /* Used when the interpreter to send the
* command to is within the same process. */
- (void)dummy;
/*
* Process options, if any.
@@ -1357,13 +1356,12 @@ TkSendCleanup(
static int
SendInit(
- Tcl_Interp *dummy, /* Interpreter to use for error reporting (no
+ TCL_UNUSED(Tcl_Interp *), /* Interpreter to use for error reporting (no
* errors are ever returned, but the
* interpreter is needed anyway). */
TkDisplay *dispPtr) /* Display to initialize. */
{
XSetWindowAttributes atts;
- (void)dummy;
/*
* Create the window used for communication, and set up an event handler
@@ -1779,13 +1777,12 @@ AppendPropCarefully(
static int
AppendErrorProc(
ClientData clientData, /* Command to mark complete, or NULL. */
- XErrorEvent *errorPtr) /* Information about error. */
+ TCL_UNUSED(XErrorEvent *)) /* Information about error. */
{
PendingCommand *pendingPtr = (PendingCommand *)clientData;
PendingCommand *pcPtr;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)errorPtr;
if (pendingPtr == NULL) {
return 0;
@@ -1878,11 +1875,10 @@ DeleteProc(
static Tk_RestrictAction
SendRestrictProc(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(void *), /* Not used. */
XEvent *eventPtr) /* Event that just arrived. */
{
TkDisplay *dispPtr;
- (void)dummy;
if (eventPtr->type != PropertyNotify) {
return TK_DEFER_EVENT;
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 06d908b..13a599e 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -1181,7 +1181,7 @@ Tk_WmObjCmd(
static int
WmAspectCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -1189,7 +1189,6 @@ WmAspectCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
int numer1, denom1, numer2, denom2;
- (void)tkwin;
if ((objc != 3) && (objc != 7)) {
Tcl_WrongNumArgs(interp, 2, objv,
@@ -1384,14 +1383,13 @@ WmGetAttribute(
static int
WmAttributesCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int attribute = 0;
- (void)tkwin;
if (objc == 3) { /* wm attributes $win */
Tcl_Obj *result = Tcl_NewListObj(0,0);
@@ -1449,7 +1447,7 @@ WmAttributesCmd(
static int
WmClientCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -1457,7 +1455,6 @@ WmClientCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- (void)tkwin;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?name?");
@@ -1636,7 +1633,7 @@ WmColormapwindowsCmd(
static int
WmCommandCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -1646,7 +1643,6 @@ WmCommandCmd(
const char *argv3;
int cmdArgc;
const char **cmdArgv;
- (void)tkwin;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?value?");
@@ -1706,14 +1702,13 @@ WmCommandCmd(
static int
WmDeiconifyCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
- (void)tkwin;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -1757,7 +1752,7 @@ WmDeiconifyCmd(
static int
WmFocusmodelCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -1769,7 +1764,6 @@ WmFocusmodelCmd(
enum options {
OPT_ACTIVE, OPT_PASSIVE };
int index;
- (void)tkwin;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?active|passive?");
@@ -1813,17 +1807,13 @@ WmFocusmodelCmd(
static int
WmForgetCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel or Frame to work with */
- Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
+ TCL_UNUSED(Tcl_Interp *), /* Current interpreter. */
+ TCL_UNUSED(int), /* Number of arguments. */
+ TCL_UNUSED(Tcl_Obj *const *)) /* Argument objects. */
{
Tk_Window frameWin = (Tk_Window) winPtr;
- (void)tkwin;
- (void)interp;
- (void)objc;
- (void)objv;
if (Tk_IsTopLevel(frameWin)) {
TkFocusJoin(winPtr);
@@ -1870,7 +1860,7 @@ WmForgetCmd(
static int
WmFrameCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -1879,7 +1869,6 @@ WmFrameCmd(
WmInfo *wmPtr = winPtr->wmInfoPtr;
Window window;
char buf[TCL_INTEGER_SPACE];
- (void)tkwin;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -1913,7 +1902,7 @@ WmFrameCmd(
static int
WmGeometryCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -1923,7 +1912,6 @@ WmGeometryCmd(
char xSign, ySign;
int width, height;
const char *argv3;
- (void)tkwin;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?newGeometry?");
@@ -1974,7 +1962,7 @@ WmGeometryCmd(
static int
WmGridCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -1982,7 +1970,6 @@ WmGridCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
int reqWidth, reqHeight, widthInc, heightInc;
- (void)tkwin;
if ((objc != 3) && (objc != 7)) {
Tcl_WrongNumArgs(interp, 2, objv,
@@ -2149,7 +2136,7 @@ WmGroupCmd(
static int
WmIconbitmapCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2158,7 +2145,6 @@ WmIconbitmapCmd(
WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
const char *argv3;
- (void)tkwin;
if ((objc < 3) || (objc > 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?bitmap?");
@@ -2210,14 +2196,13 @@ WmIconbitmapCmd(
static int
WmIconifyCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
- (void)tkwin;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -2339,7 +2324,7 @@ WmIconmaskCmd(
static int
WmIconnameCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2347,7 +2332,6 @@ WmIconnameCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- (void)tkwin;
if (objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?newName?");
@@ -2391,7 +2375,7 @@ WmIconnameCmd(
static int
WmIconphotoCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2402,7 +2386,6 @@ WmIconphotoCmd(
Tk_PhotoImageBlock block;
int i, size = 0, width, height, index = 0, x, y, isDefault = 0;
unsigned long *iconPropertyData;
- (void)tkwin;
if (objc < 4) {
Tcl_WrongNumArgs(interp, 2, objv,
@@ -2542,7 +2525,7 @@ WmIconphotoCmd(
static int
WmIconpositionCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2550,7 +2533,6 @@ WmIconpositionCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y;
- (void)tkwin;
if ((objc != 3) && (objc != 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?x y?");
@@ -2720,17 +2702,14 @@ WmIconwindowCmd(
static int
WmManageCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel or Frame to work with */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
+ TCL_UNUSED(int), /* Number of arguments. */
+ TCL_UNUSED(Tcl_Obj *const *)) /* Argument objects. */
{
Tk_Window frameWin = (Tk_Window) winPtr;
WmInfo *wmPtr = winPtr->wmInfoPtr;
- (void)tkwin;
- (void)objc;
- (void)objv;
if (!Tk_IsTopLevel(frameWin)) {
if (!Tk_IsManageable(frameWin)) {
@@ -2785,7 +2764,7 @@ WmManageCmd(
static int
WmMaxsizeCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2793,7 +2772,6 @@ WmMaxsizeCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
- (void)tkwin;
if ((objc != 3) && (objc != 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?");
@@ -2845,7 +2823,7 @@ WmMaxsizeCmd(
static int
WmMinsizeCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2853,7 +2831,6 @@ WmMinsizeCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
- (void)tkwin;
if ((objc != 3) && (objc != 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?");
@@ -2897,7 +2874,7 @@ WmMinsizeCmd(
static int
WmOverrideredirectCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2905,7 +2882,6 @@ WmOverrideredirectCmd(
{
int boolean, curValue;
XSetWindowAttributes atts;
- (void)tkwin;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?boolean?");
@@ -2956,7 +2932,7 @@ WmOverrideredirectCmd(
static int
WmPositionfromCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -2968,7 +2944,6 @@ WmPositionfromCmd(
enum options {
OPT_PROGRAM, OPT_USER };
int index;
- (void)tkwin;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?user/program?");
@@ -3024,7 +2999,7 @@ WmPositionfromCmd(
static int
WmProtocolCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -3035,7 +3010,6 @@ WmProtocolCmd(
Atom protocol;
const char *cmd;
TkSizeT cmdLength;
- (void)tkwin;
if ((objc < 3) || (objc > 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?name? ?command?");
@@ -3135,7 +3109,7 @@ WmProtocolCmd(
static int
WmResizableCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -3143,7 +3117,6 @@ WmResizableCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
- (void)tkwin;
if ((objc != 3) && (objc != 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?");
@@ -3195,7 +3168,7 @@ WmResizableCmd(
static int
WmSizefromCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -3207,7 +3180,6 @@ WmSizefromCmd(
enum options {
OPT_PROGRAM, OPT_USER };
int index;
- (void)tkwin;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?user|program?");
@@ -3388,7 +3360,7 @@ WmStackorderCmd(
static int
WmStateCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -3400,7 +3372,6 @@ WmStateCmd(
enum options {
OPT_NORMAL, OPT_ICONIC, OPT_WITHDRAWN };
int index;
- (void)tkwin;
if ((objc < 3) || (objc > 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?state?");
@@ -3495,7 +3466,7 @@ WmStateCmd(
static int
WmTitleCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
@@ -3503,7 +3474,6 @@ WmTitleCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- (void)tkwin;
if (objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?newTitle?");
@@ -3698,14 +3668,13 @@ WmTransientCmd(
static int
WmWithdrawCmd(
- Tk_Window tkwin, /* Main window of the application. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
TkWindow *winPtr, /* Toplevel to work with */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
- (void)tkwin;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -4525,12 +4494,11 @@ WrapperEventProc(
static void
TopLevelReqProc(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(void *), /* Not used. */
Tk_Window tkwin) /* Information about window. */
{
TkWindow *winPtr = (TkWindow *) tkwin;
WmInfo *wmPtr = winPtr->wmInfoPtr;
- (void)dummy;
if (wmPtr == NULL) {
return;
diff --git a/win/tkWinSendCom.c b/win/tkWinSendCom.c
index 536c6c1..2d66862 100644
--- a/win/tkWinSendCom.c
+++ b/win/tkWinSendCom.c
@@ -432,7 +432,7 @@ Async(
static HRESULT
Send(
- TkWinSendCom *obj,
+ TkWinSendCom *comobj,
VARIANT vCmd,
VARIANT *pvResult,
EXCEPINFO *pExcepInfo,
@@ -441,7 +441,7 @@ Send(
HRESULT hr = S_OK;
int result = TCL_OK;
VARIANT v;
- Tcl_Interp *interp = obj->interp;
+ Tcl_Interp *interp = comobj->interp;
Tcl_Obj *scriptPtr;
Tcl_DString ds;
(void)puArgErr;