diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-08 16:49:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-08 16:49:06 (GMT) |
commit | 7b507ce5d4879deb3479ee07dc39e2f7b9bb86c2 (patch) | |
tree | 32a65429d4b799e113c9d5517ac2974bd2359799 /macosx/tkMacOSXMenus.c | |
parent | d02acd85db6c30b28e7c2e98e46955076d44c406 (diff) | |
download | tk-7b507ce5d4879deb3479ee07dc39e2f7b9bb86c2.zip tk-7b507ce5d4879deb3479ee07dc39e2f7b9bb86c2.tar.gz tk-7b507ce5d4879deb3479ee07dc39e2f7b9bb86c2.tar.bz2 |
Instroduce TCL_UNUSED() macro, and use to make more -Wextra warnings disappear.
Diffstat (limited to 'macosx/tkMacOSXMenus.c')
-rw-r--r-- | macosx/tkMacOSXMenus.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index 82bcda7..d6d3185 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -199,6 +199,8 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp); - (void) orderFrontStandardAboutPanel: (id) sender { + (void)sender; + if (!_eventInterp || !Tcl_FindCommand(_eventInterp, "tkAboutDialog", NULL, 0) || (GetCurrentEventKeyModifiers() & optionKey)) { TkAboutDlg(); @@ -231,6 +233,8 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp); - (void) tkSource: (id) sender { + (void)sender; + if (_eventInterp) { if (Tcl_EvalEx(_eventInterp, "tk_getOpenFile -filetypes {" "{{TCL Scripts} {.tcl} TEXT} {{Text Files} {} TEXT}}", @@ -256,6 +260,8 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp); - (void) tkDemo: (id) sender { + (void)sender; + if (_eventInterp) { Tcl_Obj *path = GetWidgetDemoPath(_eventInterp); @@ -281,6 +287,8 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp); - (BOOL) validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>) anItem { + (void)anItem; + return YES; } @@ -355,9 +363,9 @@ GetWidgetDemoPath( void TkMacOSXHandleMenuSelect( - short theMenu, - unsigned short theItem, - int optionKeyPressed) + TCL_UNUSED(short), + TCL_UNUSED(unsigned short), + TCL_UNUSED(int)) { Tcl_Panic("TkMacOSXHandleMenuSelect: Obsolete, no more Carbon!"); } @@ -380,7 +388,7 @@ TkMacOSXHandleMenuSelect( void TkMacOSXInitMenus( - Tcl_Interp *interp) + TCL_UNUSED(Tcl_Interp *)) { [NSApp _setupMenus]; } |