summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-05 22:15:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-05 22:15:07 (GMT)
commitd02acd85db6c30b28e7c2e98e46955076d44c406 (patch)
tree06dd9ca6a4bde441b4ab228b484436dd97ecb3b1 /macosx
parent3cc748dc86a2c3c813e2c7d9409a58e9a239d9c8 (diff)
downloadtk-d02acd85db6c30b28e7c2e98e46955076d44c406.zip
tk-d02acd85db6c30b28e7c2e98e46955076d44c406.tar.gz
tk-d02acd85db6c30b28e7c2e98e46955076d44c406.tar.bz2
Eliminate many -Wextra warnings
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDialog.c9
-rw-r--r--macosx/tkMacOSXDraw.c10
-rw-r--r--macosx/tkMacOSXEmbed.c17
-rw-r--r--macosx/tkMacOSXFont.c44
-rw-r--r--macosx/tkMacOSXHLEvents.c22
-rw-r--r--macosx/tkMacOSXInit.c9
-rw-r--r--macosx/tkMacOSXKeyEvent.c17
-rw-r--r--macosx/tkMacOSXKeyboard.c5
-rw-r--r--macosx/tkMacOSXMenu.c15
-rw-r--r--macosx/tkMacOSXMouseEvent.c3
-rw-r--r--macosx/tkMacOSXNotify.c9
-rw-r--r--macosx/tkMacOSXScrlbr.c1
-rw-r--r--macosx/tkMacOSXSend.c9
-rw-r--r--macosx/tkMacOSXServices.c8
-rw-r--r--macosx/tkMacOSXSubwindows.c6
-rw-r--r--macosx/tkMacOSXWindowEvent.c2
16 files changed, 153 insertions, 33 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 455362a..c41f8fb 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -204,9 +204,11 @@ getFileURL(
}
- (void)panel:(id)sender didChangeToDirectoryURL:(NSURL *)url {
+ (void)sender; (void)url;
}
- (BOOL)panel:(id)sender validateURL:(NSURL *)url error:(NSError **)outError {
+ (void)sender; (void)url;
*outError = nil;
return YES;
}
@@ -1361,11 +1363,13 @@ TkAboutDlg(void)
int
TkMacOSXStandardAboutPanelObjCmd(
- ClientData clientData, /* Unused. */
+ ClientData dummy, /* Unused. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
+ (void)dummy;
+
if (objc > 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -1632,6 +1636,7 @@ enum FontchooserOption {
- (void) changeFont: (id) sender
{
NSFontManager *fm = [NSFontManager sharedFontManager];
+ (void)sender;
if ([fm currentFontAction] == NSViaPanelFontAction) {
NSFont *font = [fm convertFont:fontPanelFont];
@@ -1657,6 +1662,8 @@ enum FontchooserOption {
- (NSUInteger) validModesForFontPanel: (NSFontPanel *) fontPanel
{
+ (void)fontPanel;
+
return (NSFontPanelStandardModesMask & ~NSFontPanelAllEffectsModeMask) |
NSFontPanelUnderlineEffectModeMask |
NSFontPanelStrikethroughEffectModeMask;
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 82b433a..e6ccf20 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1453,6 +1453,7 @@ TkScrollWindow(
HIShapeRef dmgRgn = NULL, extraRgn = NULL;
NSRect bounds, visRect, scrollSrc, scrollDst;
int result = 0;
+ (void)gc;
if (view) {
/*
@@ -1539,6 +1540,9 @@ TkMacOSXSetUpGraphicsPort(
GC gc, /* GC to apply to current port. */
void *destPort)
{
+ (void)gc;
+ (void)destPort;
+
Tcl_Panic("TkMacOSXSetUpGraphicsPort: Obsolete, no more QD!");
}
@@ -1573,6 +1577,7 @@ TkMacOSXSetupDrawingContext(
NSWindow *win = NULL;
TkMacOSXDrawingContext dc = {};
CGRect clipBounds;
+ (void)useCG;
/*
* If the drawable is not a pixmap and it has an associated NSWindow then
@@ -1874,6 +1879,7 @@ void
TkMacOSXSetUpClippingRgn(
Drawable drawable) /* Drawable to update. */
{
+ (void)drawable;
}
/*
@@ -1901,6 +1907,7 @@ TkpClipDrawableToRect(
int width, int height)
{
MacDrawable *macDraw = (MacDrawable *) d;
+ (void)display;
if (macDraw->drawRgn) {
CFRelease(macDraw->drawRgn);
@@ -1989,6 +1996,9 @@ TkMacOSXMakeStippleMap(
Drawable drawable, /* Window to apply stipple. */
Drawable stipple) /* The stipple pattern. */
{
+ (void)drawable;
+ (void)stipple;
+
return NULL;
}
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index ccd107a..b69fb48 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -121,6 +121,7 @@ TkpMakeWindow(
Window parent)
{
MacDrawable *macWin;
+ (void)parent;
/*
* If this window is marked as embedded then the window structure should
@@ -559,7 +560,7 @@ TkpClaimFocus(
int
TkpTestembedCmd(
- ClientData clientData, /* Main window for application. */
+ ClientData dummy, /* Main window for application. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
@@ -569,6 +570,7 @@ 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;
@@ -667,6 +669,9 @@ TkpRedirectKeyEvent(
XEvent *eventPtr) /* X event to redirect (should be KeyPress or
* KeyRelease). */
{
+ (void)winPtr;
+ (void)eventPtr;
+
/* TODO: Implement this or decide it definitely needs no implementation */
}
@@ -1084,6 +1089,7 @@ static void
EmbedSendConfigure(
Container *containerPtr) /* Information about the embedding. */
{
+ (void)containerPtr;
}
/*
@@ -1191,12 +1197,14 @@ void
TkpShowBusyWindow(
TkBusy busy)
{
+ (void)busy;
}
void
TkpHideBusyWindow(
TkBusy busy)
{
+ (void)busy;
}
void
@@ -1204,6 +1212,8 @@ TkpMakeTransparentWindowExist(
Tk_Window tkwin, /* Token for window. */
Window parent) /* Parent window. */
{
+ (void)tkwin;
+ (void)parent;
}
void
@@ -1214,6 +1224,11 @@ TkpCreateBusy(
Tk_Window tkParent,
TkBusy busy)
{
+ (void)winPtr;
+ (void)tkRef;
+ (void)parentPtr;
+ (void)tkParent;
+ (void)busy;
}
/*
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 6cc5da2..295f4de 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -56,25 +56,25 @@ struct SystemFontMapEntry {
#define ThemeFont(n, ...) { kTheme##n##Font, "system" #n "Font", ##__VA_ARGS__ }
static const struct SystemFontMapEntry systemFontMap[] = {
ThemeFont(System, "TkDefaultFont", "TkIconFont"),
- ThemeFont(EmphasizedSystem, "TkCaptionFont"),
+ ThemeFont(EmphasizedSystem, "TkCaptionFont", NULL),
ThemeFont(SmallSystem, "TkHeadingFont", "TkTooltipFont"),
- ThemeFont(SmallEmphasizedSystem),
- ThemeFont(Application, "TkTextFont"),
- ThemeFont(Label, "TkSmallCaptionFont"),
- ThemeFont(Views),
- ThemeFont(MenuTitle),
- ThemeFont(MenuItem, "TkMenuFont"),
- ThemeFont(MenuItemMark),
- ThemeFont(MenuItemCmdKey),
- ThemeFont(WindowTitle),
- ThemeFont(PushButton),
- ThemeFont(UtilityWindowTitle),
- ThemeFont(AlertHeader),
- ThemeFont(Toolbar),
- ThemeFont(MiniSystem),
- { kThemeSystemFontDetail, "systemDetailSystemFont" },
- { kThemeSystemFontDetailEmphasized, "systemDetailEmphasizedSystemFont" },
- { -1, NULL }
+ ThemeFont(SmallEmphasizedSystem, NULL, NULL),
+ ThemeFont(Application, "TkTextFont", NULL),
+ ThemeFont(Label, "TkSmallCaptionFont", NULL),
+ ThemeFont(Views, NULL, NULL),
+ ThemeFont(MenuTitle, NULL, NULL),
+ ThemeFont(MenuItem, "TkMenuFont", NULL),
+ ThemeFont(MenuItemMark, NULL, NULL),
+ ThemeFont(MenuItemCmdKey, NULL, NULL),
+ ThemeFont(WindowTitle, NULL, NULL),
+ ThemeFont(PushButton, NULL, NULL),
+ ThemeFont(UtilityWindowTitle, NULL, NULL),
+ ThemeFont(AlertHeader, NULL, NULL),
+ ThemeFont(Toolbar, NULL, NULL),
+ ThemeFont(MiniSystem, NULL, NULL),
+ { kThemeSystemFontDetail, "systemDetailSystemFont", NULL, NULL },
+ { kThemeSystemFontDetailEmphasized, "systemDetailEmphasizedSystemFont", NULL, NULL },
+ { -1, NULL, NULL, NULL }
};
#undef ThemeFont
@@ -612,6 +612,7 @@ TkpGetNativeFont(
MacFont *fontPtr = NULL;
ThemeFontID themeFontId;
CTFontRef ctFont;
+ (void)tkwin;
if (strcmp(name, SYSTEMFONT_NAME) == 0) {
themeFontId = kThemeSystemFont;
@@ -759,6 +760,7 @@ TkpGetFontFamilies(
{
Tcl_Obj *resultPtr = Tcl_NewListObj(0, NULL);
NSArray *list = [[NSFontManager sharedFontManager] availableFontFamilies];
+ (void)tkwin;
for (NSString *family in list) {
Tcl_ListObjAppendElement(NULL, resultPtr,
@@ -838,6 +840,7 @@ TkpGetFontAttrsForChar(
*faPtr = fontPtr->font.fa;
if (nsFont && ![[nsFont coveredCharacterSet] characterIsMember:c]) {
UTF16Char ch = (UTF16Char) c;
+ (void)tkwin;
nsFont = [nsFont bestMatchingFontForCharacters:&ch
length:1 attributes:nil actualCoveredLength:NULL];
@@ -1212,6 +1215,7 @@ TkpDrawCharsInContext(
* whole (not just the range) string when
* drawing. */
{
+ (void)display;
DrawCharsInContext(display, drawable, gc, tkfont, source, numBytes,
rangeStart, rangeLength, x, y, 0.0);
}
@@ -1252,6 +1256,7 @@ DrawCharsInContext(
NSFont *nsFont;
CGAffineTransform t;
int h;
+ (void)display;
if (rangeStart < 0 || rangeLength <= 0 ||
rangeStart + rangeLength > numBytes ||
@@ -1379,6 +1384,9 @@ TkMacOSXIsCharacterMissing(
Tk_Font tkfont, /* The font we are looking in. */
unsigned int searchChar) /* The character we are looking for. */
{
+ (void)tkfont;
+ (void)searchChar;
+
return 0;
}
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index f9c26c6..49516cf 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -64,11 +64,13 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
@implementation TKApplication(TKHLEvents)
- (void) terminate: (id) sender
{
+ (void)sender;
[self handleQuitApplicationEvent:Nil withReplyEvent:Nil];
}
- (void) preferences: (id) sender
{
+ (void)sender;
[self handleShowPreferencesEvent:Nil withReplyEvent:Nil];
}
@@ -76,6 +78,8 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
KillEvent *eventPtr;
+ (void)event;
+ (void)replyEvent;
if (_eventInterp) {
/*
@@ -97,6 +101,9 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
- (void) handleOpenApplicationEvent: (NSAppleEventDescriptor *)event
withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
+ (void)event;
+ (void)replyEvent;
+
if (_eventInterp &&
Tcl_FindCommand(_eventInterp, "::tk::mac::OpenApplication", NULL, 0)){
int code = Tcl_EvalEx(_eventInterp, "::tk::mac::OpenApplication",
@@ -110,6 +117,9 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
- (void) handleReopenApplicationEvent: (NSAppleEventDescriptor *)event
withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
+ (void)event;
+ (void)replyEvent;
+
[NSApp activateIgnoringOtherApps: YES];
if (_eventInterp && Tcl_FindCommand(_eventInterp,
"::tk::mac::ReopenApplication", NULL, 0)) {
@@ -124,6 +134,9 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
- (void) handleShowPreferencesEvent: (NSAppleEventDescriptor *)event
withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
+ (void)event;
+ (void)replyEvent;
+
if (_eventInterp &&
Tcl_FindCommand(_eventInterp, "::tk::mac::ShowPreferences", NULL, 0)){
int code = Tcl_EvalEx(_eventInterp, "::tk::mac::ShowPreferences",
@@ -147,6 +160,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
long count, index;
AEKeyword keyword;
Tcl_DString pathName;
+ (void)replyEvent;
/*
* Do nothing if we don't have an interpreter.
@@ -226,6 +240,8 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
const char *printFile = [file UTF8String];
AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo));
Tcl_DString *printCommand = &AEInfo->command;
+ (void)replyEvent;
+
Tcl_DStringInit(printCommand);
Tcl_DStringAppend(printCommand, printDocProc, -1);
Tcl_DStringAppendElement(printCommand, printFile);
@@ -336,6 +352,8 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
const char *cURL=[url UTF8String];
AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo));
Tcl_DString *launchCommand = &AEInfo->command;
+ (void)replyEvent;
+
Tcl_DStringInit(launchCommand);
Tcl_DStringAppend(launchCommand, launchURLProc, -1);
Tcl_DStringAppendElement(launchCommand, cURL);
@@ -424,10 +442,11 @@ static void ProcessAppleEvent(
void
TkMacOSXInitAppleEvents(
- Tcl_Interp *interp) /* not used */
+ Tcl_Interp *dummy) /* not used */
{
NSAppleEventManager *aeManager = [NSAppleEventManager sharedAppleEventManager];
static Boolean initialized = FALSE;
+ (void)dummy;
if (!initialized) {
initialized = TRUE;
@@ -539,6 +558,7 @@ ReallyKillMe(
Tcl_Interp *interp = ((KillEvent *) eventPtr)->interp;
int quit = Tcl_FindCommand(interp, "::tk::mac::Quit", NULL, 0)!=NULL;
int code = Tcl_EvalEx(interp, quit ? "::tk::mac::Quit" : "exit", -1, TCL_EVAL_GLOBAL);
+ (void)flags;
if (code != TCL_OK) {
/*
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index aae315a..4d94952 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -92,6 +92,7 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
-(void)applicationWillFinishLaunching:(NSNotification *)aNotification
{
+ (void)aNotification;
/*
* Initialize notifications.
@@ -123,6 +124,8 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
-(void)applicationDidFinishLaunching:(NSNotification *)notification
{
+ (void)notification;
+
/*
* It is not safe to force activation of the NSApp until this method is
* called. Activating too early can cause the menu bar to be unresponsive.
@@ -484,11 +487,13 @@ TkpGetAppName(
static int
TkMacOSXGetAppPathCmd(
- ClientData ignored,
+ ClientData dummy,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
+ (void)dummy;
+
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -621,6 +626,8 @@ TkMacOSXGetNamedSymbol(
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 d3704d2..dd6a447 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -365,6 +365,9 @@ static unsigned isFunctionKey(unsigned int code);
- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)theRange
actualRange:(NSRangePointer)thePointer
{
+ (void)theRange;
+ (void)thePointer;
+
return nil;
}
@@ -382,6 +385,7 @@ static unsigned isFunctionKey(unsigned int code);
Tk_Window focusWin = (Tk_Window) winPtr->dispPtr->focusPtr;
NSString *temp;
NSString *str;
+ (void)selRange;
str = ([aString isKindOfClass: [NSAttributedString class]]) ?
[aString string] : aString;
@@ -470,6 +474,9 @@ static unsigned isFunctionKey(unsigned int code);
{
NSRect rect;
NSPoint pt;
+ (void)theRange;
+ (void)thePointer;
+
pt.x = caret_x;
pt.y = caret_y;
@@ -524,6 +531,7 @@ static unsigned isFunctionKey(unsigned int code);
- (NSUInteger)characterIndexForPoint: (NSPoint)thePoint
{
+ (void)thePoint;
if (NS_KEYLOG) {
TKLog(@"characterIndexForPoint request");
}
@@ -533,6 +541,8 @@ static unsigned isFunctionKey(unsigned int code);
- (NSAttributedString *)attributedSubstringFromRange: (NSRange)theRange
{
static NSAttributedString *str = nil;
+ (void)theRange;
+
if (str == nil) {
str = [NSAttributedString new];
}
@@ -631,6 +641,10 @@ XGrabKeyboard(
{
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 = TkMacOSXDrawableWindow(grab_window);
@@ -669,6 +683,9 @@ XUngrabKeyboard(
Display* display,
Time time)
{
+ (void)display;
+ (void)time;
+
if (modalSession) {
[NSApp endModalSession:modalSession];
modalSession = nil;
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index e91dfe2..b64424e 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -140,6 +140,7 @@ static int KeycodeToUnicode(UniChar * uniChars, int maxChars,
@implementation TKApplication(TKKeyboard)
- (void) keyboardChanged: (NSNotification *) notification
{
+ (void)notification;
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification);
#endif
@@ -534,6 +535,8 @@ char *
XKeysymToString(
KeySym keysym)
{
+ (void)keysym;
+
return NULL;
}
@@ -541,6 +544,8 @@ KeySym
XStringToKeysym(
const char* string)
{
+ (void)string;
+
return NoSymbol;
}
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 735f7d2..35c0275 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -41,7 +41,7 @@ static const struct {
SPECIALMENU(help, HELP),
SPECIALMENU(apple, APPLE),
SPECIALMENU(window, WINDOWS),
- {NULL}
+ {NULL, 0, 0}
};
#undef SPECIALMENU
@@ -58,7 +58,7 @@ static const struct {
MODIFIER(Command, NSCommandKeyMask),
MODIFIER(Cmd, NSCommandKeyMask),
MODIFIER(Meta, NSCommandKeyMask),
- {NULL}
+ {NULL, 0, 0}
};
#undef MODIFIER
@@ -86,7 +86,7 @@ static const struct {
ACCEL(Help, NSHelpFunctionKey),
ACCEL(Power, 0x233d),
ACCEL(Eject, 0xf804),
- {NULL}
+ {NULL, 0, 0}
};
#undef ACCEL
#undef sl
@@ -287,6 +287,8 @@ static int ModifierCharWidth(Tk_Font tkfont);
- (BOOL) menuHasKeyEquivalent: (NSMenu *) menu forEvent: (NSEvent *) event
target: (id *) target action: (SEL *) action
{
+ (void)menu;
+
/*
* Use lowercaseString when comparing keyEquivalents since the notion of
* a shifted upper case letter does not make much sense.
@@ -343,6 +345,8 @@ static int ModifierCharWidth(Tk_Font tkfont);
- (void) menuWillOpen: (NSMenu *) menu
{
+ (void)menu;
+
if (_tkMenu) {
//RecursivelyClearActiveMenu(_tkMenu);
GenerateMenuSelectEvent((TKMenu *)[self supermenu],
@@ -352,6 +356,8 @@ static int ModifierCharWidth(Tk_Font tkfont);
- (void) menuDidClose: (NSMenu *) menu
{
+ (void)menu;
+
if (_tkMenu) {
RecursivelyClearActiveMenu(_tkMenu);
}
@@ -359,6 +365,8 @@ static int ModifierCharWidth(Tk_Font tkfont);
- (void) menu: (NSMenu *) menu willHighlightItem: (NSMenuItem *) item
{
+ (void)menu;
+
if (_tkMenu) {
GenerateMenuSelectEvent(self, item);
}
@@ -367,6 +375,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
- (void) menuNeedsUpdate: (NSMenu *) menu
{
TkMenu *menuPtr = (TkMenu *) _tkMenu;
+ (void)menu;
if (menuPtr) {
Tcl_Interp *interp = menuPtr->interp;
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index b18b4ef..476056f 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -463,6 +463,9 @@ XQueryPointer(
{
int getGlobal = (root_x_return && root_y_return);
int getLocal = (win_x_return && win_y_return && w != None);
+ (void)display;
+ (void)root_return;
+ (void)child_return;
if (getGlobal || getLocal) {
NSPoint global = [NSEvent mouseLocation];
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 098fe4c..cac7fce 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -252,8 +252,9 @@ Tk_MacOSXSetupTkNotifier(void)
static void
TkMacOSXNotifyExitHandler(
- ClientData clientData) /* Not used. */
+ ClientData dummy) /* Not used. */
{
+ (void)dummy;
TSD_INIT();
Tcl_DeleteEventSource(TkMacOSXEventsSetupProc,
@@ -285,11 +286,12 @@ TkMacOSXNotifyExitHandler(
static void
TkMacOSXEventsSetupProc(
- ClientData clientData,
+ ClientData dummy,
int flags)
{
static Bool havePeriodicEvents = NO;
NSString *runloopMode = [[NSRunLoop currentRunLoop] currentMode];
+ (void)dummy;
/*
* runloopMode will be nil if we are in a Tcl event loop.
@@ -348,10 +350,11 @@ TkMacOSXEventsSetupProc(
*/
static void
TkMacOSXEventsCheckProc(
- ClientData clientData,
+ ClientData dummy,
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/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index dff6cc9..bf09a3f 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -486,6 +486,7 @@ void
TkpConfigureScrollbar(
TkScrollbar *scrollPtr)
{
+ (void)scrollPtr;
/* empty */
}
diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c
index 8b65532..e96570e 100644
--- a/macosx/tkMacOSXSend.c
+++ b/macosx/tkMacOSXSend.c
@@ -320,7 +320,7 @@ Tk_SetAppName(
int
Tk_SendObjCmd(
- ClientData clientData, /* Used only for deletion */
+ ClientData dummy, /* Not used */
Tcl_Interp *interp, /* The interp we are sending from */
int objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* The arguments */
@@ -332,6 +332,7 @@ Tk_SendObjCmd(
RegisteredInterp *riPtr;
Tcl_Obj *listObjPtr;
int result = TCL_OK;
+ (void)dummy;
for (i = 1; i < (objc - 1); ) {
stringRep = Tcl_GetString(objv[i]);
@@ -466,6 +467,7 @@ TkGetInterpNames(
{
Tcl_Obj *listObjPtr;
RegisteredInterp *riPtr;
+ (void)tkwin;
listObjPtr = Tcl_NewListObj(0, NULL);
riPtr = interpListPtr;
@@ -498,10 +500,9 @@ TkGetInterpNames(
static int
SendInit(
- Tcl_Interp *interp) /* Interpreter to use for error reporting (no
- * errors are ever returned, but the
- * interpreter is needed anyway). */
+ Tcl_Interp *dummy) /* Not used */
{
+ (void)dummy;
return TCL_OK;
}
diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c
index e92158f..ac56279 100644
--- a/macosx/tkMacOSXServices.c
+++ b/macosx/tkMacOSXServices.c
@@ -24,6 +24,9 @@ ServicesEventProc(
int flags)
{
TkMainInfo *info = TkGetMainInfoList();
+ (void)event;
+ (void)flags;
+
Tcl_GlobalEval(info->interp, "::tk::mac::PerformService");
return 1;
}
@@ -104,6 +107,8 @@ ServicesEventProc(
NSString *pboardString = nil, *pboardType = nil;
NSArray *types = [pboard types];
Tcl_Event *event;
+ (void)data;
+ (void)error;
/*
* Get a string from the private pasteboard and copy it to the general
@@ -138,8 +143,9 @@ ServicesEventProc(
int
TkMacOSXServices_Init(
- Tcl_Interp *interp)
+ Tcl_Interp *dummy)
{
+ (void)dummy;
/*
* Initialize an instance of TkService and register it with the NSApp.
*/
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 5cbbbf1..b814fbc 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -55,6 +55,7 @@ XDestroyWindow(
Window window) /* Window. */
{
MacDrawable *macWin = (MacDrawable *) window;
+ (void)display;
/*
* Remove any dangling pointers that may exist if the window we are
@@ -676,6 +677,7 @@ XConfigureWindow(
{
MacDrawable *macWin = (MacDrawable *) w;
TkWindow *winPtr = macWin->winPtr;
+ (void)values;
display->request++;
@@ -992,6 +994,7 @@ InvalViewRect(
{
static CGAffineTransform t;
NSView *view = ref;
+ (void)rgn;
if (!view) {
return paramErr;
@@ -1122,6 +1125,8 @@ void *
TkMacOSXGetDrawablePort(
Drawable drawable)
{
+ (void)drawable;
+
return NULL;
}
@@ -1422,6 +1427,7 @@ Tk_GetPixmap(
int depth) /* Bits per pixel for pixmap. */
{
MacDrawable *macPix;
+ (void)d;
if (display != NULL) {
display->request++;
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index d9ad52f..aca502d 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -139,6 +139,8 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
- (NSRect)windowWillUseStandardFrame:(NSWindow *)window
defaultFrame:(NSRect)newFrame
{
+ (void)window;
+
/*
* This method needs to be implemented in order for [NSWindow isZoomed] to
* give the correct answer. But it suffices to always validate every