summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXHLEvents.c
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/tkMacOSXHLEvents.c
parent3cc748dc86a2c3c813e2c7d9409a58e9a239d9c8 (diff)
downloadtk-d02acd85db6c30b28e7c2e98e46955076d44c406.zip
tk-d02acd85db6c30b28e7c2e98e46955076d44c406.tar.gz
tk-d02acd85db6c30b28e7c2e98e46955076d44c406.tar.bz2
Eliminate many -Wextra warnings
Diffstat (limited to 'macosx/tkMacOSXHLEvents.c')
-rw-r--r--macosx/tkMacOSXHLEvents.c22
1 files changed, 21 insertions, 1 deletions
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) {
/*