summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkBind.c5
-rw-r--r--generic/tkBusy.c10
-rw-r--r--generic/tkClipboard.c17
-rw-r--r--generic/tkCmds.c25
-rw-r--r--generic/tkConfig.c3
-rw-r--r--generic/tkConsole.c34
-rw-r--r--generic/tkEvent.c11
-rw-r--r--generic/tkGet.c3
-rw-r--r--generic/tkGrab.c3
-rw-r--r--generic/tkObj.c3
-rw-r--r--generic/tkOldConfig.c3
-rw-r--r--generic/tkStyle.c13
12 files changed, 42 insertions, 88 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 66a7447..ec121cd 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -949,11 +949,10 @@ ClearList(
static PSEntry *
FreePatSeqEntry(
- PSList *pool,
+ TCL_UNUSED(PSList *),
PSEntry *entry)
{
PSEntry *next = PSList_Next(entry);
- (void)pool;
PSModMaskArr_Free(&entry->lastModMaskArr);
ckfree(entry);
@@ -5192,7 +5191,7 @@ GetPatternObj(
case ButtonPress:
case ButtonRelease:
assert(patPtr->info <= Button9);
- Tcl_AppendPrintfToObj(patternObj, "-%u", (unsigned) patPtr->info);
+ Tcl_AppendPrintfToObj(patternObj, "-%u", (unsigned)patPtr->info);
break;
#if PRINT_SHORT_MOTION_SYNTAX
case MotionNotify: {
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 5925381..f6ae494 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -125,10 +125,9 @@ SetWindowInstanceData(
static void
BusyCustodyProc(
ClientData clientData, /* Information about the busy window. */
- Tk_Window tkwin) /* Not used. */
+ TCL_UNUSED(Tk_Window)) /* Not used. */
{
Busy *busyPtr = (Busy *)clientData;
- (void)tkwin;
Tk_DeleteEventHandler(busyPtr->tkBusy, StructureNotifyMask, BusyEventProc,
busyPtr);
@@ -158,14 +157,11 @@ BusyCustodyProc(
static void
BusyGeometryProc(
- ClientData dummy, /* Information about window that got new
+ TCL_UNUSED(void *), /* Information about window that got new
* preferred geometry. */
- Tk_Window tkwin) /* Other Tk-related information about the
+ TCL_UNUSED(Tk_Window)) /* Other Tk-related information about the
* window. */
{
- (void)dummy;
- (void)tkwin;
-
/* Should never get here */
}
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index 8a7ffee..dc83238 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -173,16 +173,12 @@ ClipboardAppHandler(
static TkSizeT
ClipboardWindowHandler(
- ClientData dummy, /* Not used. */
- TkSizeT offset, /* Return selection bytes starting at this
+ TCL_UNUSED(void *), /* Not used. */
+ TCL_UNUSED(int), /* Return selection bytes starting at this
* offset. */
char *buffer, /* Place to store converted selection. */
- TkSizeT maxBytes) /* Maximum # of bytes to store at buffer. */
+ TCL_UNUSED(int)) /* Maximum # of bytes to store at buffer. */
{
- (void)dummy;
- (void)offset;
- (void)maxBytes;
-
buffer[0] = '.';
buffer[1] = 0;
return 1;
@@ -641,11 +637,10 @@ Tk_ClipboardObjCmd(
int
TkClipInit(
- Tcl_Interp *dummy, /* Interpreter to use for error reporting. */
+ TCL_UNUSED(Tcl_Interp *), /* Interpreter to use for error reporting. */
TkDisplay *dispPtr)/* Display to initialize. */
{
XSetWindowAttributes atts;
- (void)dummy;
dispPtr->clipTargetPtr = NULL;
dispPtr->clipboardActive = 0;
@@ -710,12 +705,10 @@ static int
ClipboardGetProc(
ClientData clientData, /* Dynamic string holding partially assembled
* selection. */
- Tcl_Interp *dummy, /* Interpreter used for error reporting (not
+ TCL_UNUSED(Tcl_Interp *), /* Interpreter used for error reporting (not
* used). */
const char *portion) /* New information to be appended. */
{
- (void)dummy;
-
Tcl_DStringAppend((Tcl_DString *)clientData, portion, -1);
return TCL_OK;
}
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 6a06185..a8d72fc 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -897,13 +897,12 @@ UseinputmethodsCmd(
int
WindowingsystemCmd(
- ClientData dummy, /* Main window associated with interpreter. */
+ TCL_UNUSED(void *), /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *windowingsystem;
- (void)dummy;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
@@ -1114,16 +1113,12 @@ Tk_TkwaitObjCmd(
static char *
WaitVariableProc(
ClientData clientData, /* Pointer to integer to set to 1. */
- Tcl_Interp *dummy, /* Interpreter containing variable. */
- const char *name1, /* Name of variable. */
- const char *name2, /* Second part of variable name. */
- int flags) /* Information about what happened. */
+ TCL_UNUSED(Tcl_Interp *), /* Interpreter containing variable. */
+ TCL_UNUSED(const char *), /* Name of variable. */
+ TCL_UNUSED(const char *), /* Second part of variable name. */
+ TCL_UNUSED(int)) /* Information about what happened. */
{
int *donePtr = (int *)clientData;
- (void)dummy;
- (void)name1;
- (void)name2;
- (void)flags;
*donePtr = 1;
return NULL;
@@ -1174,7 +1169,7 @@ WaitWindowProc(
int
Tk_UpdateObjCmd(
- ClientData dummy, /* Main window associated with interpreter. */
+ TCL_UNUSED(void *), /* Main window associated with interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1183,7 +1178,6 @@ Tk_UpdateObjCmd(
int flags, index;
TkDisplay *dispPtr;
int code = TCL_OK;
- (void)dummy;
if (objc == 1) {
flags = TCL_DONT_WAIT;
@@ -1906,14 +1900,11 @@ TkGetDisplayOf(
int
TkDeadAppObjCmd(
- ClientData dummy, /* Dummy. */
+ TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TCL_UNUSED(int), /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
- (void)dummy;
- (void)objc;
-
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't invoke \"%s\" command: application has been destroyed",
Tcl_GetString(objv[0])));
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 096f8b2..dd0980f 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -2062,7 +2062,7 @@ Tk_GetOptionValue(
Tcl_Obj *
TkDebugConfig(
- Tcl_Interp *dummy, /* Interpreter in which the table is
+ TCL_UNUSED(Tcl_Interp *), /* Interpreter in which the table is
* defined. */
Tk_OptionTable table) /* Table about which information is to be
* returned. May not necessarily exist in the
@@ -2074,7 +2074,6 @@ TkDebugConfig(
Tcl_Obj *objPtr;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)dummy;
objPtr = Tcl_NewObj();
if (!tablePtr || !tsdPtr->initialized) {
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index cb2b2e0..345c937 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -67,7 +67,7 @@ static int InterpreterObjCmd(ClientData clientData, Tcl_Interp *interp,
static const Tcl_ChannelType consoleChannelType = {
"console", /* Type name. */
- TCL_CHANNEL_VERSION_5, /* v4 channel */
+ TCL_CHANNEL_VERSION_5, /* v5 channel */
(Tcl_DriverCloseProc *)ConsoleClose, /* Close proc. */
ConsoleInput, /* Input proc. */
ConsoleOutput, /* Output proc. */
@@ -561,17 +561,12 @@ ConsoleOutput(
static int
ConsoleInput(
- void *dummy, /* Unused. */
- char *buf, /* Where to store data read. */
- int bufSize, /* How much space is available in the
+ TCL_UNUSED(void *),
+ TCL_UNUSED(char *), /* Where to store data read. */
+ TCL_UNUSED(int), /* How much space is available in the
* buffer? */
- int *errorCode) /* Where to store error code. */
+ TCL_UNUSED(int *)) /* Where to store error code. */
{
- (void)dummy;
- (void)buf;
- (void)bufSize;
- (void)errorCode;
-
return 0; /* Always return EOF. */
}
@@ -594,11 +589,10 @@ ConsoleInput(
static int
ConsoleClose(
ClientData instanceData,
- Tcl_Interp *dummy) /* Unused. */
+ TCL_UNUSED(Tcl_Interp *))
{
ChannelData *data = (ChannelData *)instanceData;
ConsoleInfo *info = data->info;
- (void)dummy;
if (info) {
if (info->refCount-- <= 1) {
@@ -645,13 +639,11 @@ Console2Close(
static void
ConsoleWatch(
- ClientData dummy, /* Device ID for the channel. */
- int mask) /* OR-ed combination of TCL_READABLE,
+ TCL_UNUSED(void *), /* Device ID for the channel. */
+ TCL_UNUSED(int)) /* OR-ed combination of TCL_READABLE,
* TCL_WRITABLE and TCL_EXCEPTION, for the
* events we are interested in. */
{
- (void)dummy;
- (void)mask;
}
/*
@@ -673,16 +665,12 @@ ConsoleWatch(
static int
ConsoleHandle(
- ClientData dummy, /* Device ID for the channel. */
- int direction, /* TCL_READABLE or TCL_WRITABLE to indicate
+ TCL_UNUSED(void *), /* Device ID for the channel. */
+ TCL_UNUSED(int), /* TCL_READABLE or TCL_WRITABLE to indicate
* which direction of the channel is being
* requested. */
- ClientData *handlePtr) /* Where to store handle */
+ TCL_UNUSED(void **)) /* Where to store handle */
{
- (void)dummy;
- (void)direction;
- (void)handlePtr;
-
return TCL_ERROR;
}
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index c94ad50..07ce8e7 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -691,7 +691,7 @@ Tk_CreateEventHandler(
ClientData clientData) /* Arbitrary data to pass to proc. */
{
TkEventHandler *handlerPtr;
- TkWindow *winPtr = (TkWindow *) token;
+ TkWindow *winPtr = (TkWindow *)token;
/*
* Skim through the list of existing handlers to (a) compute the overall
@@ -1040,10 +1040,9 @@ TkEventInit(void)
static int
TkXErrorHandler(
ClientData clientData, /* Pointer to flag we set. */
- XErrorEvent *errEventPtr) /* X error info. */
+ TCL_UNUSED(XErrorEvent *)) /* X error info. */
{
int *error = (int *)clientData;
- (void)errEventPtr;
*error = 1;
return 0;
@@ -2003,10 +2002,9 @@ TkDeleteThreadExitHandler(
void
TkFinalize(
- ClientData dummy) /* Arbitrary value to pass to proc. */
+ TCL_UNUSED(void *)) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
- (void)dummy;
#if defined(_WIN32) && !defined(STATIC_BUILD)
if (!tclStubsPtr) {
@@ -2056,12 +2054,11 @@ TkFinalize(
void
TkFinalizeThread(
- ClientData dummy) /* Arbitrary value to pass to proc. */
+ TCL_UNUSED(void *)) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)dummy;
Tcl_DeleteThreadExitHandler(TkFinalizeThread, NULL);
diff --git a/generic/tkGet.c b/generic/tkGet.c
index 7ca4d17..f2aed2c 100644
--- a/generic/tkGet.c
+++ b/generic/tkGet.c
@@ -493,11 +493,10 @@ Tk_NameOfJustify(
static void
FreeUidThreadExitProc(
- ClientData dummy) /* Not used. */
+ TCL_UNUSED(void *))
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)dummy;
Tcl_DeleteHashTable(&tsdPtr->uidTable);
tsdPtr->initialized = 0;
diff --git a/generic/tkGrab.c b/generic/tkGrab.c
index 87bfdde..db51c96 100644
--- a/generic/tkGrab.c
+++ b/generic/tkGrab.c
@@ -1395,12 +1395,11 @@ QueueGrabWindowChange(
static int
GrabWinEventProc(
Tcl_Event *evPtr, /* Event of type NewGrabWinEvent. */
- int flags) /* Flags argument to Tcl_DoOneEvent: indicates
+ TCL_UNUSED(int)) /* Flags argument to Tcl_DoOneEvent: indicates
* what kinds of events are being processed
* right now. */
{
NewGrabWinEvent *grabEvPtr = (NewGrabWinEvent *) evPtr;
- (void)flags;
grabEvPtr->dispPtr->grabWinPtr = (TkWindow *) Tk_IdToWindow(
grabEvPtr->dispPtr->display, grabEvPtr->grabWindow);
diff --git a/generic/tkObj.c b/generic/tkObj.c
index 7f3b7ff..3f623f6 100644
--- a/generic/tkObj.c
+++ b/generic/tkObj.c
@@ -965,12 +965,11 @@ TkGetWindowFromObj(
static int
SetWindowFromAny(
- Tcl_Interp *dummy, /* Used for error reporting if not NULL. */
+ TCL_UNUSED(Tcl_Interp *),
Tcl_Obj *objPtr) /* The object to convert. */
{
const Tcl_ObjType *typePtr;
WindowRep *winPtr;
- (void)dummy;
/*
* Free the old internalRep before setting the new one.
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index df3a5e4..6e9a49e 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -1161,12 +1161,11 @@ GetCachedSpecs(
static void
DeleteSpecCacheTable(
ClientData clientData,
- Tcl_Interp *dummy)
+ TCL_UNUSED(Tcl_Interp *))
{
Tcl_HashTable *tablePtr = (Tcl_HashTable *)clientData;
Tcl_HashEntry *entryPtr;
Tcl_HashSearch search;
- (void)dummy;
for (entryPtr = Tcl_FirstHashEntry(tablePtr,&search); entryPtr != NULL;
entryPtr = Tcl_NextHashEntry(&search)) {
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index 9ec08ca..e845ad8 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.c
@@ -178,11 +178,10 @@ static const Tcl_ObjType styleObjType = {
void
TkStylePkgInit(
- TkMainInfo *mainPtr) /* The application being created. */
+ TCL_UNUSED(TkMainInfo *)) /* The application being created. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)mainPtr;
if (tsdPtr->nbInit != 0) {
return;
@@ -234,7 +233,7 @@ TkStylePkgInit(
void
TkStylePkgFree(
- TkMainInfo *mainPtr) /* The application being deleted. */
+ TCL_UNUSED(TkMainInfo *)) /* The application being deleted. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -242,7 +241,6 @@ TkStylePkgFree(
Tcl_HashEntry *entryPtr;
StyleEngine *enginePtr;
int i;
- (void)mainPtr;
tsdPtr->nbInit--;
if (tsdPtr->nbInit != 0) {
@@ -523,10 +521,8 @@ InitElement(
static void
FreeElement(
- Element *elementPtr) /* The element to free. */
+ TCL_UNUSED(Element *)) /* The element to free. */
{
- (void)elementPtr;
-
/* Nothing to do. */
}
@@ -1380,9 +1376,8 @@ Tk_GetStyle(
void
Tk_FreeStyle(
- Tk_Style style)
+ TCL_UNUSED(Tk_Style))
{
- (void)style;
}
/*