summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-07 14:23:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-07 14:23:23 (GMT)
commite7953de2198c6fefc2b141147f4a09b2f0742149 (patch)
tree611c005977d8eb3f89b93ed0a82a6aba7cbe6689
parent5f3ad44447241b09dab870b83c9abda867097862 (diff)
parent1e218f90dab9db97b0f7b9c3013c78b871e11b36 (diff)
downloadtk-e7953de2198c6fefc2b141147f4a09b2f0742149.zip
tk-e7953de2198c6fefc2b141147f4a09b2f0742149.tar.gz
tk-e7953de2198c6fefc2b141147f4a09b2f0742149.tar.bz2
Merge 8.6 (more TCL_UNUSED usage)
-rw-r--r--win/tkWinButton.c9
-rw-r--r--win/tkWinClipboard.c17
-rw-r--r--win/tkWinDraw.c10
-rw-r--r--win/tkWinEmbed.c4
-rw-r--r--win/tkWinImage.c9
-rw-r--r--win/tkWinKey.c6
-rw-r--r--win/tkWinMenu.c142
-rw-r--r--win/tkWinPixmap.c18
-rw-r--r--win/tkWinPointer.c5
-rw-r--r--win/tkWinScrlbr.c11
10 files changed, 81 insertions, 150 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index e6b9a5b..751a398 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.c
@@ -79,7 +79,7 @@ static Tcl_ThreadDataKey dataKey;
static LRESULT CALLBACK ButtonProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam);
static Window CreateProc(Tk_Window tkwin, Window parent,
- ClientData instanceData);
+ void *instanceData);
static void InitBoxes(void);
/*
@@ -208,10 +208,9 @@ TkpButtonSetDefaults(void)
TkButton *
TkpCreateButton(
- Tk_Window tkwin)
+ TCL_UNUSED(Tk_Window))
{
WinButton *butPtr;
- (void)tkwin;
butPtr = (WinButton *)ckalloc(sizeof(WinButton));
butPtr->hwnd = NULL;
@@ -239,7 +238,7 @@ static Window
CreateProc(
Tk_Window tkwin, /* Token for window. */
Window parentWin, /* Parent of new window. */
- ClientData instanceData) /* Button instance data. */
+ void *instanceData) /* Button instance data. */
{
Window window;
HWND parent;
@@ -313,7 +312,7 @@ TkpDestroyButton(
void
TkpDisplayButton(
- ClientData clientData) /* Information about widget. */
+ void *clientData) /* Information about widget. */
{
TkWinDCState state;
HDC dc;
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c
index 56fece8..7e92a4d 100644
--- a/win/tkWinClipboard.c
+++ b/win/tkWinClipboard.c
@@ -47,7 +47,7 @@ TkSelGetSelection(
* returned. */
Tk_GetSelProc *proc, /* Procedure to call to process the selection,
* once it has been retrieved. */
- ClientData clientData) /* Arbitrary value to pass to proc. */
+ void *clientData) /* Arbitrary value to pass to proc. */
{
char *data, *destPtr;
Tcl_DString ds;
@@ -227,15 +227,13 @@ TkSelGetSelection(
int
XSetSelectionOwner(
- Display *display,
+ TCL_UNUSED(Display *),
Atom selection,
Window owner,
- Time time)
+ TCL_UNUSED(Time))
{
HWND hwnd = owner ? TkWinGetHWND(owner) : NULL;
Tk_Window tkwin;
- (void)display;
- (void)time;
/*
* This is a gross hack because the Tk_InternAtom interface is broken. It
@@ -277,7 +275,7 @@ XSetSelectionOwner(
void
TkWinClipboardRender(
TkDisplay *dispPtr,
- UINT format)
+ TCL_UNUSED(UINT))
{
TkClipboardTarget *targetPtr;
TkClipboardBuffer *cbPtr;
@@ -285,7 +283,6 @@ TkWinClipboardRender(
char *buffer, *p, *rawText, *endPtr;
int length;
Tcl_DString ds;
- (void)format;
for (targetPtr = dispPtr->clipTargetPtr; targetPtr != NULL;
targetPtr = targetPtr->nextPtr) {
@@ -369,10 +366,9 @@ TkWinClipboardRender(
void
TkSelUpdateClipboard(
TkWindow *winPtr,
- TkClipboardTarget *targetPtr)
+ TCL_UNUSED(TkClipboardTarget *))
{
HWND hwnd = TkWinGetHWND(winPtr->window);
- (void)targetPtr;
UpdateClipboard(hwnd);
}
@@ -453,9 +449,8 @@ TkSelEventProc(
void
TkSelPropProc(
- XEvent *eventPtr) /* X PropertyChange event. */
+ TCL_UNUSED(XEvent *)) /* X PropertyChange event. */
{
- (void)eventPtr;
}
/*
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index c2e2c25..13c9878 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -980,13 +980,12 @@ XFillPolygon(
GC gc,
XPoint *points,
int npoints,
- int shape,
+ TCL_UNUSED(int),
int mode)
{
HPEN pen;
TkWinDCState state;
HDC dc;
- (void)shape;
if (d == None) {
return BadDrawable;
@@ -1399,7 +1398,7 @@ SetUpGraphicsPort(
int
TkScrollWindow(
Tk_Window tkwin, /* The window to be scrolled. */
- GC gc, /* GC for window to be scrolled. */
+ TCL_UNUSED(GC), /* GC for window to be scrolled. */
int x, int y, int width, int height,
/* Position rectangle to be scrolled. */
int dx, int dy, /* Distance rectangle should be moved. */
@@ -1407,7 +1406,6 @@ TkScrollWindow(
{
HWND hwnd = TkWinGetHWND(Tk_WindowId(tkwin));
RECT scrollRect;
- (void)gc;
scrollRect.left = x;
scrollRect.top = y;
@@ -1480,12 +1478,10 @@ void
Tk_DrawHighlightBorder(
Tk_Window tkwin,
GC fgGC,
- GC bgGC,
+ TCL_UNUSED(GC),
int highlightWidth,
Drawable drawable)
{
- (void)bgGC;
-
TkDrawInsetFocusHighlight(tkwin, fgGC, highlightWidth, drawable, 0);
}
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index a583801..d6f7d76 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -41,7 +41,7 @@ typedef struct {
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
-static void ContainerEventProc(ClientData clientData,
+static void ContainerEventProc(void *clientData,
XEvent *eventPtr);
static void EmbedGeometryRequest(Container *containerPtr,
int width, int height);
@@ -853,7 +853,7 @@ EmbedGeometryRequest(
static void
ContainerEventProc(
- ClientData clientData, /* Token for container window. */
+ void *clientData, /* Token for container window. */
XEvent *eventPtr) /* ResizeRequest event. */
{
Container *containerPtr = (Container *)clientData;
diff --git a/win/tkWinImage.c b/win/tkWinImage.c
index 00edae7..72f4d50 100644
--- a/win/tkWinImage.c
+++ b/win/tkWinImage.c
@@ -201,8 +201,8 @@ PutPixel(
XImage *
XCreateImage(
- Display *display,
- Visual *visual,
+ TCL_UNUSED(Display *),
+ TCL_UNUSED(Visual *),
unsigned int depth,
int format,
int offset,
@@ -213,8 +213,6 @@ XCreateImage(
int bytes_per_line)
{
XImage* imagePtr = (XImage*)ckalloc(sizeof(XImage));
- (void)display;
- (void)visual;
imagePtr->width = width;
imagePtr->height = height;
@@ -288,7 +286,7 @@ XGetImageZPixmap(
Drawable d,
int x, int y,
unsigned int width, unsigned int height,
- unsigned long plane_mask,
+ TCL_UNUSED(unsigned long),
int format)
{
TkWinDrawable *twdPtr = (TkWinDrawable *)d;
@@ -303,7 +301,6 @@ XGetImageZPixmap(
unsigned char *data;
TkWinDCState state;
BOOL ret;
- (void)plane_mask;
if (format != ZPixmap) {
TkpDisplayWarning("Only ZPixmap types are implemented",
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index a8257af..1c636dc 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -165,14 +165,12 @@ XKeycodeToKeysym(
KeySym
XkbKeycodeToKeysym(
- Display *display,
+ TCL_UNUSED(Display *),
unsigned int keycode,
- int group,
+ TCL_UNUSED(int),
int index)
{
int state = 0;
- (void)display;
- (void)group;
if (index & 0x01) {
state |= ShiftMask;
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index f8d8dd5..06316cc 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -176,11 +176,11 @@ static void GetTearoffEntryGeometry(TkMenu *menuPtr,
const Tk_FontMetrics *fmPtr, int *widthPtr,
int *heightPtr);
static int GetNewID(TkMenuEntry *mePtr, WORD *menuIDPtr);
-static int TkWinMenuKeyObjCmd(ClientData clientData,
+static int TkWinMenuKeyObjCmd(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static void MenuSelectEvent(TkMenu *menuPtr);
-static void ReconfigureWindowsMenu(ClientData clientData);
+static void ReconfigureWindowsMenu(void *clientData);
static void RecursivelyClearActiveMenu(TkMenu *menuPtr);
static void SetDefaults(int firstTime);
static LRESULT CALLBACK TkWinMenuProc(HWND hwnd, UINT message, WPARAM wParam,
@@ -569,7 +569,7 @@ GetEntryText(
static void
ReconfigureWindowsMenu(
- ClientData clientData) /* The menu we are rebuilding */
+ void *clientData) /* The menu we are rebuilding */
{
TkMenu *menuPtr = (TkMenu *)clientData;
TkMenuEntry *mePtr;
@@ -762,7 +762,7 @@ ReconfigureWindowsMenu(
int
TkpPostMenu(
- Tcl_Interp *dummy,
+ TCL_UNUSED(Tcl_Interp *),
TkMenu *menuPtr,
int x, int y, int index)
{
@@ -774,7 +774,6 @@ TkpPostMenu(
int oldServiceMode = Tcl_GetServiceMode();
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)dummy;
tsdPtr->inPostMenu++;
CallPendingReconfigureImmediately(menuPtr);
@@ -873,14 +872,13 @@ TkpPostMenu(
int
TkpPostTearoffMenu(
- Tcl_Interp *dummy, /* The interpreter of the menu */
+ TCL_UNUSED(Tcl_Interp *), /* The interpreter of the menu */
TkMenu *menuPtr, /* The menu we are posting */
int x, int y, int index) /* The root X,Y coordinates where we are
* posting */
{
int vRootX, vRootY, vRootWidth, vRootHeight;
int result;
- (void)dummy;
TkActivateMenuEntry(menuPtr, -1);
TkRecomputeMenu(menuPtr);
@@ -1038,7 +1036,7 @@ TkWinMenuProc(
static void
UpdateEmbeddedMenu(
- ClientData clientData)
+ void *clientData)
{
RECT rc;
HWND hMenuWnd = (HWND)clientData;
@@ -1082,7 +1080,7 @@ TkWinEmbeddedMenuProc(
if ((wParam == MSGF_MENU) && (nIdles < 1)
&& (hwnd == tsdPtr->embeddedMenuHWND)) {
Tcl_CreateTimerHandler(200, UpdateEmbeddedMenu,
- (ClientData) lParam);
+ (void *) lParam);
nIdles++;
}
break;
@@ -1140,7 +1138,7 @@ TkWinEmbeddedMenuProc(
int
TkWinHandleMenuEvent(
- HWND *phwnd,
+ TCL_UNUSED(HWND *),
UINT *pMessage,
WPARAM *pwParam,
LPARAM *plParam,
@@ -1152,7 +1150,6 @@ TkWinHandleMenuEvent(
TkMenuEntry *mePtr;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)phwnd;
switch (*pMessage) {
case WM_UNINITMENUPOPUP:
@@ -1561,15 +1558,11 @@ TkpSetWindowMenuBar(
void
Tk_SetMainMenubar(
- Tcl_Interp *interp, /* The interpreter of the application */
- Tk_Window tkwin, /* The frame we are setting up */
- const char *menuName) /* The name of the menu to put in front. If
+ TCL_UNUSED(Tcl_Interp *), /* The interpreter of the application */
+ TCL_UNUSED(Tk_Window), /* The frame we are setting up */
+ TCL_UNUSED(const char *)) /* The name of the menu to put in front. If
* NULL, use the default menu bar. */
{
- (void)interp;
- (void)tkwin;
- (void)menuName;
-
/*
* Nothing to do.
*/
@@ -1595,15 +1588,11 @@ void
GetMenuIndicatorGeometry(
TkMenu *menuPtr, /* The menu we are measuring */
TkMenuEntry *mePtr, /* The entry we are measuring */
- Tk_Font tkfont, /* Precalculated font */
- const Tk_FontMetrics *fmPtr,/* Precalculated font metrics */
+ TCL_UNUSED(Tk_Font), /* Precalculated font */
+ TCL_UNUSED(const Tk_FontMetrics *),/* Precalculated font metrics */
int *widthPtr, /* The resulting width */
int *heightPtr) /* The resulting height */
{
- (void)menuPtr;
- (void)tkfont;
- (void)fmPtr;
-
*heightPtr = indicatorDimensions[0];
if (mePtr->hideMargin) {
*widthPtr = 0;
@@ -1687,15 +1676,12 @@ GetMenuAccelGeometry(
void
GetTearoffEntryGeometry(
TkMenu *menuPtr, /* The menu we are measuring */
- TkMenuEntry *mePtr, /* The entry we are measuring */
- Tk_Font tkfont, /* The precalculated font */
+ TCL_UNUSED(TkMenuEntry *), /* The entry we are measuring */
+ TCL_UNUSED(Tk_Font), /* The precalculated font */
const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */
int *widthPtr, /* The resulting width */
int *heightPtr) /* The resulting height */
{
- (void)mePtr;
- (void)tkfont;
-
if (menuPtr->menuType != MAIN_MENU) {
*heightPtr = 0;
} else {
@@ -1722,17 +1708,13 @@ GetTearoffEntryGeometry(
void
GetMenuSeparatorGeometry(
- TkMenu *menuPtr, /* The menu we are measuring */
- TkMenuEntry *mePtr, /* The entry we are measuring */
- Tk_Font tkfont, /* The precalculated font */
+ TCL_UNUSED(TkMenu *), /* The menu we are measuring */
+ TCL_UNUSED(TkMenuEntry *), /* The entry we are measuring */
+ TCL_UNUSED(Tk_Font), /* The precalculated font */
const Tk_FontMetrics *fmPtr,/* The precalcualted font metrics */
int *widthPtr, /* The resulting width */
int *heightPtr) /* The resulting height */
{
- (void)menuPtr;
- (void)mePtr;
- (void)tkfont;
-
*widthPtr = 0;
*heightPtr = fmPtr->linespace - (2 * fmPtr->descent);
}
@@ -1839,18 +1821,13 @@ DrawMenuEntryIndicator(
Drawable d, /* What we are drawing into */
GC gc, /* The gc we are drawing with */
GC indicatorGC, /* The gc for indicator objects */
- Tk_Font tkfont, /* The precalculated font */
- const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */
+ TCL_UNUSED(Tk_Font), /* The precalculated font */
+ TCL_UNUSED(const Tk_FontMetrics *),/* The precalculated font metrics */
int x, /* Left edge */
int y, /* Top edge */
- int width,
- int height)
+ TCL_UNUSED(int),
+ TCL_UNUSED(int))
{
- (void)tkfont;
- (void)fmPtr;
- (void)width;
- (void)height;
-
if ((mePtr->type == CHECK_BUTTON_ENTRY)
|| (mePtr->type == RADIO_BUTTON_ENTRY)) {
if (mePtr->indicatorOn && (mePtr->entryFlags & ENTRY_SELECTED)) {
@@ -1922,18 +1899,15 @@ DrawMenuEntryAccelerator(
GC gc, /* The gc we are drawing with */
Tk_Font tkfont, /* The precalculated font */
const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */
- Tk_3DBorder activeBorder, /* The border when an item is active */
+ TCL_UNUSED(Tk_3DBorder), /* The border when an item is active */
int x, /* left edge */
int y, /* top edge */
- int width, /* Width of menu entry */
+ TCL_UNUSED(int), /* Width of menu entry */
int height) /* Height of menu entry */
{
int baseline;
int leftEdge = x + mePtr->indicatorSpace + mePtr->labelWidth;
const char *accel;
- (void)activeBorder;
- (void)width;
- (void)height;
if (menuPtr->menuType == MENUBAR) {
return;
@@ -1996,7 +1970,7 @@ DrawMenuEntryArrow(
TkMenuEntry *mePtr, /* The entry we are drawing */
Drawable d, /* What we are drawing into */
GC gc, /* The gc we are drawing with */
- Tk_3DBorder activeBorder, /* The border when an item is active */
+ TCL_UNUSED(Tk_3DBorder), /* The border when an item is active */
int x, /* left edge */
int y, /* top edge */
int width, /* Width of menu entry */
@@ -2008,8 +1982,6 @@ DrawMenuEntryArrow(
COLORREF oldFgColor;
COLORREF oldBgColor;
RECT rect;
- (void)gc;
- (void)activeBorder;
if (!drawArrow || (mePtr->type != CASCADE_ENTRY)) {
return;
@@ -2078,11 +2050,11 @@ DrawMenuEntryArrow(
void
DrawMenuSeparator(
TkMenu *menuPtr, /* The menu we are drawing */
- TkMenuEntry *mePtr, /* The entry we are drawing */
+ TCL_UNUSED(TkMenuEntry *), /* The entry we are drawing */
Drawable d, /* What we are drawing into */
- GC gc, /* The gc we are drawing with */
- Tk_Font tkfont, /* The precalculated font */
- const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */
+ TCL_UNUSED(GC), /* The gc we are drawing with */
+ TCL_UNUSED(Tk_Font), /* The precalculated font */
+ TCL_UNUSED(const Tk_FontMetrics *),/* The precalculated font metrics */
int x, /* left edge */
int y, /* top edge */
int width, /* width of item */
@@ -2090,10 +2062,6 @@ DrawMenuSeparator(
{
XPoint points[2];
Tk_3DBorder border;
- (void)mePtr;
- (void)gc;
- (void)tkfont;
- (void)fmPtr;
points[0].x = x;
points[0].y = y + height / 2;
@@ -2130,12 +2098,9 @@ DrawMenuUnderline(
const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */
int x, /* Left Edge */
int y, /* Top Edge */
- int width, /* Width of entry */
+ TCL_UNUSED(int), /* Width of entry */
int height) /* Height of entry */
{
- (void)fmPtr;
- (void)width;
-
if ((mePtr->underline >= 0) && (mePtr->labelPtr != NULL)) {
int len;
@@ -2176,7 +2141,7 @@ DrawMenuUnderline(
static int
TkWinMenuKeyObjCmd(
- ClientData dummy, /* Unused. */
+ TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2188,7 +2153,6 @@ TkWinMenuKeyObjCmd(
TkWindow *winPtr;
KeySym keySym;
int i;
- (void)dummy;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "window keySym");
@@ -2322,28 +2286,28 @@ TkpInitializeMenuBindings(
(void) Tcl_CreateObjCommand(interp, "tk::WinMenuKey",
TkWinMenuKeyObjCmd, Tk_MainWindow(interp), NULL);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<Alt_L>", "tk::WinMenuKey %W %N", 0);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<KeyRelease-Alt_L>", "tk::WinMenuKey %W %N", 0);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<Alt_R>", "tk::WinMenuKey %W %N", 0);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<KeyRelease-Alt_R>", "tk::WinMenuKey %W %N", 0);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<Alt-Key>", "tk::WinMenuKey %W %N", 0);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<Alt-KeyRelease>", "tk::WinMenuKey %W %N", 0);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<Key-F10>", "tk::WinMenuKey %W %N", 0);
- (void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
+ (void) Tk_CreateBinding(interp, bindingTable, (void *)uid,
"<KeyRelease-F10>", "tk::WinMenuKey %W %N", 0);
}
@@ -2588,21 +2552,17 @@ TkpComputeMenubarGeometry(
void
DrawTearoffEntry(
TkMenu *menuPtr, /* The menu we are drawing */
- TkMenuEntry *mePtr, /* The entry we are drawing */
+ TCL_UNUSED(TkMenuEntry *), /* The entry we are drawing */
Drawable d, /* The drawable we are drawing into */
- GC gc, /* The gc we are drawing with */
- Tk_Font tkfont, /* The font we are drawing with */
- const Tk_FontMetrics *fmPtr,/* The metrics we are drawing with */
+ TCL_UNUSED(GC), /* The gc we are drawing with */
+ TCL_UNUSED(Tk_Font), /* The font we are drawing with */
+ TCL_UNUSED(const Tk_FontMetrics *),/* The metrics we are drawing with */
int x, int y,
int width, int height)
{
XPoint points[2];
int segmentWidth, maxX;
Tk_3DBorder border;
- (void)mePtr;
- (void)gc;
- (void)tkfont;
- (void)fmPtr;
if (menuPtr->menuType != MAIN_MENU) {
return;
@@ -3267,11 +3227,10 @@ TkpMenuNotifyToplevelCreate(
HWND
Tk_GetMenuHWND(
- Tk_Window tkwin)
+ TCL_UNUSED(Tk_Window))
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)tkwin;
TkMenuInit();
return tsdPtr->embeddedMenuHWND;
@@ -3295,10 +3254,8 @@ Tk_GetMenuHWND(
static void
MenuExitHandler(
- ClientData dummy) /* Not used */
+ TCL_UNUSED(void *)) /* Not used */
{
- (void)dummy;
-
UnregisterClassW(MENU_CLASS_NAME, Tk_GetHINSTANCE());
UnregisterClassW(EMBEDDED_MENU_CLASS_NAME, Tk_GetHINSTANCE());
}
@@ -3322,11 +3279,10 @@ MenuExitHandler(
static void
MenuThreadExitHandler(
- ClientData dummy) /* Not used */
+ TCL_UNUSED(void *))
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- (void)dummy;
DestroyWindow(tsdPtr->menuHWND);
DestroyWindow(tsdPtr->embeddedMenuHWND);
@@ -3358,13 +3314,11 @@ MenuThreadExitHandler(
Tcl_Obj *
TkWinGetMenuSystemDefault(
- Tk_Window tkwin, /* A window to use. */
+ TCL_UNUSED(Tk_Window), /* A window to use. */
const char *dbName, /* The option database name. */
- const char *className) /* The name of the option class. */
+ TCL_UNUSED(const char *)) /* The name of the option class. */
{
Tcl_Obj *valuePtr = NULL;
- (void)tkwin;
- (void)className;
if ((strcmp(dbName, "activeBorderWidth") == 0) ||
(strcmp(dbName, "borderWidth") == 0)) {
diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c
index c785367..ad26c12 100644
--- a/win/tkWinPixmap.c
+++ b/win/tkWinPixmap.c
@@ -197,23 +197,17 @@ TkSetPixmapColormap(
int
XGetGeometry(
- Display *display,
+ TCL_UNUSED(Display *),
Drawable d,
- Window *root_return,
- int *x_return,
- int *y_return,
+ TCL_UNUSED(Window *),
+ TCL_UNUSED(int *),
+ TCL_UNUSED(int *),
unsigned int *width_return,
unsigned int *height_return,
- unsigned int *border_width_return,
- unsigned int *depth_return)
+ TCL_UNUSED(unsigned int *),
+ TCL_UNUSED(unsigned int *))
{
TkWinDrawable *twdPtr = (TkWinDrawable *)d;
- (void)display;
- (void)root_return;
- (void)x_return;
- (void)y_return;
- (void)border_width_return;
- (void)depth_return;
if (twdPtr->type == TWD_BITMAP) {
HDC dc;
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c
index 6736ff0..b895a96 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -31,7 +31,7 @@ static int mouseTimerSet = 0; /* 1 if the mouse timer is active. */
* Forward declarations of procedures used in this file.
*/
-static void MouseTimerProc(ClientData clientData);
+static void MouseTimerProc(void *clientData);
/*
*----------------------------------------------------------------------
@@ -235,10 +235,9 @@ XUngrabKeyboard(
void
MouseTimerProc(
- ClientData dummy)
+ TCL_UNUSED(void *))
{
POINT pos;
- (void)dummy;
mouseTimerSet = 0;
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index 8e973bc..cf9f7b6 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -61,7 +61,7 @@ TCL_DECLARE_MUTEX(winScrlbrMutex)
*/
static Window CreateProc(Tk_Window tkwin, Window parent,
- ClientData instanceData);
+ void *instanceData);
static void ModalLoop(WinScrollbar *, XEvent *eventPtr);
static LRESULT CALLBACK ScrollbarProc(HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam);
@@ -80,7 +80,7 @@ const Tk_ClassProcs tkpScrollbarProcs = {
};
static void
-WinScrollbarEventProc(ClientData clientData, XEvent *eventPtr)
+WinScrollbarEventProc(void *clientData, XEvent *eventPtr)
{
WinScrollbar *scrollPtr = (WinScrollbar *)clientData;
@@ -205,7 +205,7 @@ static Window
CreateProc(
Tk_Window tkwin, /* Token for window. */
Window parentWin, /* Parent of new window. */
- ClientData instanceData) /* Scrollbar instance data. */
+ void *instanceData) /* Scrollbar instance data. */
{
DWORD style;
Window window;
@@ -273,7 +273,7 @@ CreateProc(
void
TkpDisplayScrollbar(
- ClientData clientData) /* Information about window. */
+ void *clientData) /* Information about window. */
{
WinScrollbar *scrollPtr = (WinScrollbar *)clientData;
Tk_Window tkwin = scrollPtr->info.tkwin;
@@ -591,11 +591,10 @@ ScrollbarProc(
void
TkpConfigureScrollbar(
- TkScrollbar *scrollPtr)
+ TCL_UNUSED(TkScrollbar *))
/* Information about widget; may or may not
* already have values for some fields. */
{
- (void)scrollPtr;
}
/*