diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-18 13:27:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-18 13:27:17 (GMT) |
commit | b3d78aadaa00cd3a90696c45811238ba4fa2b192 (patch) | |
tree | a67b790342898702999460a093a67129a21ee9dd | |
parent | 33b5bef8e0661438579f09fd1a281f0b9f9b5b32 (diff) | |
download | tk-b3d78aadaa00cd3a90696c45811238ba4fa2b192.zip tk-b3d78aadaa00cd3a90696c45811238ba4fa2b192.tar.gz tk-b3d78aadaa00cd3a90696c45811238ba4fa2b192.tar.bz2 |
Even more TCL_UNUSED usage
-rw-r--r-- | macosx/tkMacOSXClipboard.c | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXConfig.c | 10 | ||||
-rw-r--r-- | macosx/tkMacOSXDialog.c | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 43 | ||||
-rw-r--r-- | macosx/tkMacOSXInit.c | 11 | ||||
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 19 | ||||
-rw-r--r-- | macosx/tkMacOSXNotify.c | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXPrint.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXSend.c | 6 | ||||
-rw-r--r-- | xlib/xgc.c | 26 |
11 files changed, 50 insertions, 84 deletions
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c index 272469e..f16ab0d 100644 --- a/macosx/tkMacOSXClipboard.c +++ b/macosx/tkMacOSXClipboard.c @@ -174,7 +174,6 @@ XSetSelectionOwner( TCL_UNUSED(Time)) /* The current time? */ { TkDisplay *dispPtr = TkGetDisplayList(); - (void)time; if (dispPtr && selection == dispPtr->clipboardAtom) { clipboardOwner = owner ? Tk_IdToWindow(display, owner) : NULL; diff --git a/macosx/tkMacOSXConfig.c b/macosx/tkMacOSXConfig.c index a85c6a9..b93c9a0 100644 --- a/macosx/tkMacOSXConfig.c +++ b/macosx/tkMacOSXConfig.c @@ -35,14 +35,10 @@ Tcl_Obj * Tk_GetSystemDefault( - Tk_Window tkwin, /* A window to use. */ - const char *dbName, /* The option database name. */ - const char *className) /* The name of the option class. */ + TCL_UNUSED(Tk_Window), /* A window to use. */ + TCL_UNUSED(const char *), /* The option database name. */ + TCL_UNUSED(const char *)) /* The name of the option class. */ { - (void)tkwin; - (void)dbName; - (void)className; - return NULL; } diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 48d1467..ca30267 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -233,11 +233,13 @@ getFileURL( } - (void)panel:(id)sender didChangeToDirectoryURL:(NSURL *)url { - (void)sender; (void)url; + (void)sender; + (void)url; } - (BOOL)panel:(id)sender validateURL:(NSURL *)url error:(NSError **)outError { - (void)sender; (void)url; + (void)sender; + (void)url; *outError = nil; return YES; } diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 7f89a50..ef4f44d 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -77,11 +77,10 @@ static void EmbedWindowDeleted(TkWindow *winPtr); Window Tk_MakeWindow( Tk_Window tkwin, - Window parent) + TCL_UNUSED(Window)) { MacDrawable *macWin; TkWindow *winPtr = (TkWindow *)tkwin; - (void)parent; /* * If this window is marked as embedded then the window structure should @@ -521,7 +520,7 @@ TkpClaimFocus( int TkpTestembedCmd( - void *dummy, /* Main window for application. */ + TCL_UNUSED(void *), /* Main window for application. */ Tcl_Interp *interp, /* Current interpreter. */ Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ @@ -531,7 +530,6 @@ TkpTestembedCmd( Tcl_DString dString; char buffer[50]; Tcl_Interp *embeddedInterp = NULL, *parentInterp = NULL; - (void)dummy; if ((objc > 1) && (strcmp(Tcl_GetString(objv[1]), "all") == 0)) { all = 1; @@ -625,14 +623,11 @@ TkpTestembedCmd( void TkpRedirectKeyEvent( - TkWindow *winPtr, /* Window to which the event was originally + TCL_UNUSED(TkWindow *), /* Window to which the event was originally * reported. */ - XEvent *eventPtr) /* X event to redirect (should be KeyPress or + TCL_UNUSED(XEvent *)) /* X event to redirect (should be KeyPress or * KeyRelease). */ { - (void)winPtr; - (void)eventPtr; - /* TODO: Implement this or decide it definitely needs no implementation */ } @@ -1046,9 +1041,8 @@ EmbedGeometryRequest( static void EmbedSendConfigure( - Container *containerPtr) /* Information about the embedding. */ + TCL_UNUSED(Container *)) /* Information about the embedding. */ { - (void)containerPtr; } /* @@ -1157,40 +1151,31 @@ EmbedWindowDeleted( void TkpShowBusyWindow( - TkBusy busy) + TCL_UNUSED(TkBusy)) { - (void)busy; } void TkpHideBusyWindow( - TkBusy busy) + TCL_UNUSED(TkBusy)) { - (void)busy; } void TkpMakeTransparentWindowExist( - Tk_Window tkwin, /* Token for window. */ - Window parent) /* Parent window. */ + TCL_UNUSED(Tk_Window), /* Token for window. */ + TCL_UNUSED(Window)) /* Parent window. */ { - (void)tkwin; - (void)parent; } void TkpCreateBusy( - Tk_FakeWin *winPtr, - Tk_Window tkRef, - Window* parentPtr, - Tk_Window tkParent, - TkBusy busy) + TCL_UNUSED(Tk_FakeWin *), + TCL_UNUSED(Tk_Window), + TCL_UNUSED(Window *), + TCL_UNUSED(Tk_Window), + TCL_UNUSED(TkBusy)) { - (void)winPtr; - (void)tkRef; - (void)parentPtr; - (void)tkParent; - (void)busy; } /* diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index d003933..03a05fc 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -33,10 +33,8 @@ static char scriptPath[PATH_MAX + 1] = ""; * Forward declarations... */ -static int TkMacOSXGetAppPathObjCmd(TCL_UNUSED(void *), Tcl_Interp *ip, - int objc, Tcl_Obj *const objv[]); -static int TkMacOSVersionObjCmd(void *cd, Tcl_Interp *ip, - int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TkMacOSXGetAppPathObjCmd; +static Tcl_ObjCmdProc TkMacOSVersionObjCmd; #pragma mark TKApplication(TKInit) @@ -910,11 +908,10 @@ TkMacOSXDefaultStartupScript(void) MODULE_SCOPE void* TkMacOSXGetNamedSymbol( - const char* module, - const char* symbol) + TCL_UNUSED(const char *), + const char *symbol) { void *addr = dlsym(RTLD_NEXT, symbol); - (void)module; if (!addr) { (void) dlerror(); /* Clear dlfcn error state */ diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index c9449da..4056961 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -716,17 +716,13 @@ int XGrabKeyboard( Display* display, Window grab_window, - Bool owner_events, - int pointer_mode, - int keyboard_mode, - Time time) + TCL_UNUSED(Bool), + TCL_UNUSED(int), + TCL_UNUSED(int), + TCL_UNUSED(Time)) { keyboardGrabWinPtr = Tk_IdToWindow(display, grab_window); TkWindow *captureWinPtr = (TkWindow *) TkpGetCapture(); - (void)owner_events; - (void)pointer_mode; - (void)keyboard_mode; - (void)time; if (keyboardGrabWinPtr && captureWinPtr) { NSWindow *w = TkMacOSXGetNSWindowForDrawable(grab_window); @@ -766,12 +762,9 @@ XGrabKeyboard( int XUngrabKeyboard( - Display* display, - Time time) + TCL_UNUSED(Display *), + TCL_UNUSED(Time)) { - (void)display; - (void)time; - if (modalSession) { [NSApp endModalSession:modalSession]; modalSession = nil; diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index f2b7c16..c127d21 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -321,9 +321,8 @@ Tk_MacOSXSetupTkNotifier(void) static void TkMacOSXNotifyExitHandler( - void *dummy) /* Not used. */ + TCL_UNUSED(void *)) /* Not used. */ { - (void)dummy; TSD_INIT(); Tcl_DeleteEventSource(TkMacOSXEventsSetupProc, @@ -453,11 +452,10 @@ static const Tcl_Time zeroBlockTime = { 0, 0 }; static void TkMacOSXEventsSetupProc( - void *dummy, + TCL_UNUSED(void *), int flags) { NSString *runloopMode = [[NSRunLoop currentRunLoop] currentMode]; - (void)dummy; /* * runloopMode will be nil if we are in a Tcl event loop. diff --git a/macosx/tkMacOSXPrint.c b/macosx/tkMacOSXPrint.c index 0b1b97a..9797bfa 100644 --- a/macosx/tkMacOSXPrint.c +++ b/macosx/tkMacOSXPrint.c @@ -31,8 +31,7 @@ CFStringRef urlFile = NULL; /*Forward declaration of functions.*/ static Tcl_ObjCmdProc StartPrint; static OSStatus FinishPrint(NSString *file, int buttonValue); -static int MakePDF(void *clientData, Tcl_Interp *ip, - int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc MakePDF; int MacPrint_Init(Tcl_Interp * interp); /* Delegate class for print dialogs. */ diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index eb1c99a..ec54d42 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -484,9 +484,8 @@ TkpDestroyScrollbar( void TkpConfigureScrollbar( - TkScrollbar *scrollPtr) + TCL_UNUSED(TkScrollbar *)) { - (void)scrollPtr; /* empty */ } diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c index 321e1d5..9b18424 100644 --- a/macosx/tkMacOSXSend.c +++ b/macosx/tkMacOSXSend.c @@ -471,12 +471,11 @@ Tk_SendObjCmd( int TkGetInterpNames( Tcl_Interp *interp, /* Interpreter for returning a result. */ - Tk_Window tkwin) /* Window whose display is to be used for the + TCL_UNUSED(Tk_Window)) /* Window whose display is to be used for the * lookup. */ { Tcl_Obj *listObjPtr; RegisteredInterp *riPtr; - (void)tkwin; listObjPtr = Tcl_NewListObj(0, NULL); riPtr = interpListPtr; @@ -509,9 +508,8 @@ TkGetInterpNames( static int SendInit( - Tcl_Interp *dummy) /* Not used */ + TCL_UNUSED(Tcl_Interp *)) /* Not used */ { - (void)dummy; return TCL_OK; } @@ -649,16 +649,16 @@ XSetICFocus( Window XCreateWindow( TCL_UNUSED(Display *), - TCL_UNUSED(Window), - TCL_UNUSED(int), - TCL_UNUSED(int), + TCL_UNUSED(Window), + TCL_UNUSED(int), + TCL_UNUSED(int), TCL_UNUSED(unsigned int), - TCL_UNUSED(unsigned int), TCL_UNUSED(unsigned int), - TCL_UNUSED(int), - TCL_UNUSED(unsigned int), + TCL_UNUSED(unsigned int), + TCL_UNUSED(int), + TCL_UNUSED(unsigned int), TCL_UNUSED(Visual *), - TCL_UNUSED(unsigned long), + TCL_UNUSED(unsigned long), TCL_UNUSED(XSetWindowAttributes *)) { return 0; @@ -667,8 +667,8 @@ XCreateWindow( int XPointInRegion( TCL_UNUSED(Region), - TCL_UNUSED(int), - TCL_UNUSED(int)) + TCL_UNUSED(int), + TCL_UNUSED(int)) { return 0; } @@ -676,8 +676,8 @@ XPointInRegion( int XUnionRegion( TCL_UNUSED(Region), - TCL_UNUSED(Region), - TCL_UNUSED(Region)) + TCL_UNUSED(Region), + TCL_UNUSED(Region)) { return 0; } @@ -685,8 +685,8 @@ XUnionRegion( Region XPolygonRegion( TCL_UNUSED(XPoint *), - TCL_UNUSED(int), - TCL_UNUSED(int)) + TCL_UNUSED(int), + TCL_UNUSED(int)) { return 0; } |