diff options
author | dgp <dgp@users.sourceforge.net> | 2015-02-12 13:45:52 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-02-12 13:45:52 (GMT) |
commit | 186fd507fce8e72ceb25fa41cfe1c65429dd3398 (patch) | |
tree | 76d87a1336cc0ae03ff1717e7404dbbed46f098f /macosx | |
parent | df8fe8d77386421fadafe0b14472529c573a3f8b (diff) | |
parent | f0588ea6f1632841dfe7ed350ea5c0e78331882d (diff) | |
download | tk-186fd507fce8e72ceb25fa41cfe1c65429dd3398.zip tk-186fd507fce8e72ceb25fa41cfe1c65429dd3398.tar.gz tk-186fd507fce8e72ceb25fa41cfe1c65429dd3398.tar.bz2 |
Silence some compiler warnings.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXButton.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 9 | ||||
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXMenubutton.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 11 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 4 |
8 files changed, 17 insertions, 25 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index a88cad0..51656ee 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -471,7 +471,6 @@ TkpComputeButtonGeometry( } /* -/* *---------------------------------------------------------------------- * * DrawButtonImageAndText -- @@ -966,12 +965,10 @@ ButtonContentDrawCB ( { TkButton *butPtr = (TkButton *)ptr; Tk_Window tkwin = butPtr->tkwin; - HIRect * bounds; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { return; } - MacDrawable *macWin = (MacDrawable *) Tk_WindowId(tkwin); /*Overlay Tk elements over button native region: drawing elements within button boundaries/native region causes unpredictable metrics.*/ DrawButtonImageAndText( butPtr); diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 962dd1a..2f65517 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1478,7 +1478,6 @@ TkScrollWindow( CGRect srcRect, dstRect; HIShapeRef dmgRgn = NULL, extraRgn; NSRect bounds, visRect, scrollSrc, scrollDst; - NSPoint delta = NSMakePoint(dx, dy); int result; diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 5cd1e41..99f7584 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -200,7 +200,7 @@ TkpScanWindowId( Tcl_Obj obj; obj.refCount = 1; - obj.bytes = string; + obj.bytes = (char *) string; /* DANGER?! */ obj.length = strlen(string); obj.typePtr = NULL; diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index 8d51c33..daf860f 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -217,7 +217,6 @@ OappHandler( AppleEvent *reply, SRefCon handlerRefcon) { - Tcl_CmdInfo dummy; Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon; if (interp && @@ -289,7 +288,6 @@ PrefsHandler( AppleEvent *reply, SRefCon handlerRefcon) { - Tcl_CmdInfo dummy; Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon; if (interp && @@ -422,7 +420,6 @@ PrintHandler( long count, index; AEKeyword keyword; Tcl_DString command, pathName; - Tcl_CmdInfo dummy; int code; /* @@ -543,8 +540,12 @@ ScriptHandler( theErr = FSRefToDString(&file, &scriptName); if (theErr == noErr) { - tclErr = Tcl_FSEvalFileEx(interp, Tcl_DStringValue(&scriptName), NULL); + Tcl_Obj *pathName = + Tcl_NewStringObj(Tcl_DStringValue(&scriptName), -1); Tcl_DStringFree(&scriptName); + + tclErr = Tcl_FSEvalFile(interp, pathName); + Tcl_DecrRefCount(pathName); } else { sprintf(errString, "AEDoScriptHandler: file not found"); AEPutParamPtr(reply, keyErrorString, typeChar, errString, diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 0cfb663..c9ad9f1 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -272,8 +272,9 @@ static unsigned isFunctionKey(unsigned int code); NSString *str = [aString respondsToSelector: @selector (string)] ? [aString string] : aString; if (NS_KEYLOG) - NSLog (@"setMarkedText '%@' len =%d range %d from %d", str, [str length], - selRange.length, selRange.location); + NSLog (@"setMarkedText '%@' len =%lu range %lu from %lu", str, + (unsigned long) [str length], (unsigned long) selRange.length, + (unsigned long) selRange.location); if (privateWorkingText != nil) [self deleteWorkingText]; @@ -293,7 +294,8 @@ static unsigned isFunctionKey(unsigned int code); if (privateWorkingText == nil) return; if (NS_KEYLOG) - NSLog(@"deleteWorkingText len = %d\n", [privateWorkingText length]); + NSLog(@"deleteWorkingText len = %lu\n", + (unsigned long)[privateWorkingText length]); [privateWorkingText release]; privateWorkingText = nil; processingCompose = NO; diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c index 71ad803..d1ce553 100644 --- a/macosx/tkMacOSXMenubutton.c +++ b/macosx/tkMacOSXMenubutton.c @@ -597,10 +597,8 @@ TkMacOSXDrawMenuButton( if (useNewerHITools == 1) { - HIRect hirec; HIRect contHIRec; static HIThemeButtonDrawInfo hiinfo; - Rect contRect; MenuButtonBackgroundDrawCB((MacMenuButton*) mbPtr, 32, true); @@ -694,12 +692,10 @@ MenuButtonContentDrawCB ( { TkMenuButton *butPtr = (TkMenuButton *)ptr; Tk_Window tkwin = butPtr->tkwin; - Rect bounds; if (tkwin == NULL || !Tk_IsMapped(tkwin)) { return; } - MacDrawable *macWin = (MacDrawable *) Tk_WindowId(tkwin); DrawMenuButtonImageAndText( butPtr); } diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index fbf268b..1fd931a 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -102,12 +102,10 @@ TkpCreateScrollbar( Tk_Window tkwin) { - static int initialized = 0; - MacScrollbar *scrollPtr = ckalloc(sizeof(MacScrollbar)); + MacScrollbar *scrollPtr = (MacScrollbar *)ckalloc(sizeof(MacScrollbar)); scrollPtr->troughGC = None; scrollPtr->copyGC = None; - TkWindow *winPtr = (TkWindow *)tkwin; Tk_CreateEventHandler(tkwin,ExposureMask|StructureNotifyMask|FocusChangeMask|ButtonPressMask|VisibilityChangeMask, ScrollbarEventProc, scrollPtr); @@ -144,7 +142,6 @@ TkpDisplayScrollbar( return; } - MacScrollbar *macScrollPtr = clientData; TkWindow *winPtr = (TkWindow *) tkwin; MacDrawable *macWin = (MacDrawable *) winPtr->window; TkMacOSXDrawingContext dc; @@ -220,7 +217,7 @@ TkpComputeScrollbarGeometry( * changed. */ { - int width, height, variant, fieldLength; + int variant, fieldLength; if (scrollPtr->highlightWidth < 0) { scrollPtr->highlightWidth = 0; @@ -432,7 +429,7 @@ UpdateControlValues( MacDrawable *macWin = (MacDrawable *) Tk_WindowId(scrollPtr->tkwin); double dViewSize; HIRect contrlRect; - int variant, active; + int variant; short width, height; NSView *view = TkMacOSXDrawableView(macWin); @@ -511,8 +508,8 @@ ScrollbarPress(TkScrollbar *scrollPtr, XEvent *eventPtr) if (eventPtr->type == ButtonPress) { UpdateControlValues(scrollPtr); - return TCL_OK; } + return TCL_OK; } diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 370c86a..73ab21c 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1655,8 +1655,8 @@ WmForgetCmd( if (Tk_IsTopLevel(frameWin)) { MacDrawable *macWin; - Tk_MakeWindowExist(winPtr); - Tk_MakeWindowExist(winPtr->parentPtr); + Tk_MakeWindowExist(frameWin); + Tk_MakeWindowExist((Tk_Window)winPtr->parentPtr); macWin = (MacDrawable *) winPtr->window; |