diff options
author | dgp <dgp@users.sourceforge.net> | 2015-02-12 12:51:10 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-02-12 12:51:10 (GMT) |
commit | 6dbbfe9f269314838207f70fd26de9a7d5394039 (patch) | |
tree | 587344f98f1985de320c58734134f3eee93b87f8 /macosx | |
parent | 7d13b808151fa7b1fff9754f24f5f32739f5950b (diff) | |
download | tk-6dbbfe9f269314838207f70fd26de9a7d5394039.zip tk-6dbbfe9f269314838207f70fd26de9a7d5394039.tar.gz tk-6dbbfe9f269314838207f70fd26de9a7d5394039.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/tkMacOSXKeyEvent.c | 8 | ||||
-rw-r--r-- | macosx/tkMacOSXMenubutton.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXScrlbr.c | 11 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 5 |
7 files changed, 12 insertions, 22 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 5cdfb3c..763f544 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 8fe9a95..0b39cb4 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1477,7 +1477,6 @@ TkScrollWindow( CGRect srcRect, dstRect; HIShapeRef dmgRgn = NULL, extraRgn; NSRect bounds, visRect, scrollSrc, scrollDst; - NSPoint delta = NSMakePoint(dx, dy); int result; if ( view ) { diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index ef83276..bd7e0a8 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/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 a1c3138..05b553e 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 a9d8469..efa0f38 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 b834766..210fd6f 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1652,8 +1652,8 @@ WmForgetCmd( MacDrawable *macWin; - Tk_MakeWindowExist(winPtr); - Tk_MakeWindowExist(winPtr->parentPtr); + Tk_MakeWindowExist(frameWin); + Tk_MakeWindowExist((Tk_Window)winPtr->parentPtr); macWin = (MacDrawable *) winPtr->window; @@ -2403,7 +2403,6 @@ WmManageCmd( register Tk_Window frameWin = (Tk_Window)winPtr; register WmInfo *wmPtr = winPtr->wmInfoPtr; - char *oldClass = (char*)Tk_Class(frameWin); if (!Tk_IsTopLevel(frameWin)) { MacDrawable *macWin = (MacDrawable *) winPtr->window; |