From 5a5f73e79cc9ee55b40b403162ad15414919fcb0 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Sun, 10 Feb 2013 17:32:47 +0000 Subject: [PATCH] Silence warnings from clang. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36106 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 12 ++++++++++++ Headers/cairo/CairoGState.h | 2 +- Source/cairo/CairoGState.m | 2 +- Source/cairo/XGCairoXImageSurface.m | 2 +- Source/gsc/GSContext.m | 2 +- Source/gsc/GSStreamContext.m | 4 ++-- Source/gsc/GSStreamGState.m | 10 ++++------ Source/x11/XGDragView.m | 2 +- Source/x11/XGServerWindow.m | 20 +++++++++++++++----- 9 files changed, 38 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad9eeeb..0aed2c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2013-02-10 Fred Kiefer + + * Headers/cairo/CairoGState.h + * Source/cairo/CairoGState.m + * Source/cairo/XGCairoXImageSurface.m + * Source/gsc/GSContext.m + * Source/gsc/GSStreamContext.m + * Source/gsc/GSStreamGState.m + * Source/x11/XGServerWindow.m + * Source/x11/XGDragView.m: + Silence warnings from clang. + 2013-02-01 Fred Kiefer * Source/winlib/WIN32Context.m(-isCompatibleBitmap): Add diff --git a/Headers/cairo/CairoGState.h b/Headers/cairo/CairoGState.h index bbae71f..6185407 100644 --- a/Headers/cairo/CairoGState.h +++ b/Headers/cairo/CairoGState.h @@ -38,7 +38,7 @@ CairoSurface *_surface; } -- (void) GSCurrentSurface: (CairoSurface **)surface: (int *)x : (int *)y; +- (void) GSCurrentSurface: (CairoSurface **)surface : (int *)x : (int *)y; - (void) GSSetSurface: (CairoSurface *)surface : (int)x : (int)y; - (void) showPage; diff --git a/Source/cairo/CairoGState.m b/Source/cairo/CairoGState.m index 56cbd63..8c58e82 100644 --- a/Source/cairo/CairoGState.m +++ b/Source/cairo/CairoGState.m @@ -267,7 +267,7 @@ static inline CGFloat floatToUserSpace(NSAffineTransform *ctm, double d) return copy; } -- (void) GSCurrentSurface: (CairoSurface **)surface: (int *)x : (int *)y +- (void) GSCurrentSurface: (CairoSurface **)surface : (int *)x : (int *)y { if (x) *x = offset.x; diff --git a/Source/cairo/XGCairoXImageSurface.m b/Source/cairo/XGCairoXImageSurface.m index 56c553a..3e1526b 100644 --- a/Source/cairo/XGCairoXImageSurface.m +++ b/Source/cairo/XGCairoXImageSurface.m @@ -44,7 +44,7 @@ // I see no reason, why it isn't working, as the code is identical // to the one in the art backend. RELEASE(self); - return [[XGCairoSurface alloc] initWithDevice: device]; + return (XGCairoXImageSurface*)[[XGCairoSurface alloc] initWithDevice: device]; } di.drawing_depth = GSWINDEVICE->depth; diff --git a/Source/gsc/GSContext.m b/Source/gsc/GSContext.m index f4722d2..0f3751e 100644 --- a/Source/gsc/GSContext.m +++ b/Source/gsc/GSContext.m @@ -867,7 +867,7 @@ static NSMapTable *gtable; return ([bitmap bitmapFormat] == 0); } -- (void) GSDrawImage: (NSRect) rect: (void *) imageref +- (void) GSDrawImage: (NSRect) rect : (void *) imageref { NSBitmapImageRep *bitmap; unsigned char *data[5]; diff --git a/Source/gsc/GSStreamContext.m b/Source/gsc/GSStreamContext.m index 50a7061..eb1cc1e 100644 --- a/Source/gsc/GSStreamContext.m +++ b/Source/gsc/GSStreamContext.m @@ -736,7 +736,7 @@ fpfloat(FILE *stream, float f) } } -- (void) GSRectClipList: (const NSRect *)rects: (int)count +- (void) GSRectClipList: (const NSRect *)rects : (int)count { int i; NSRect union_rect; @@ -757,7 +757,7 @@ fpfloat(FILE *stream, float f) : NSWidth(union_rect) : NSHeight(union_rect)]; } -- (void) GSRectFillList: (const NSRect *)rects: (int)count +- (void) GSRectFillList: (const NSRect *)rects : (int)count { int i; for (i = 0; i < count; i++) diff --git a/Source/gsc/GSStreamGState.m b/Source/gsc/GSStreamGState.m index b007ad8..0b6df40 100644 --- a/Source/gsc/GSStreamGState.m +++ b/Source/gsc/GSStreamGState.m @@ -62,13 +62,13 @@ *linejoin = clinejoin; } -- (void) DPScurrentlinewidth: (float*)width +- (void) DPScurrentlinewidth: (CGFloat*)width { if (width) *width = clinewidth; } -- (void) DPScurrentmiterlimit: (float*)limit +- (void) DPScurrentmiterlimit: (CGFloat*)limit { if (limit) *limit = cmiterlimit; @@ -90,12 +90,12 @@ clinejoin = linejoin; } -- (void) DPSsetlinewidth: (float)width +- (void) DPSsetlinewidth: (CGFloat)width { clinewidth = width; } -- (void) DPSsetmiterlimit: (float)limit +- (void) DPSsetmiterlimit: (CGFloat)limit { cmiterlimit = limit; } @@ -106,5 +106,3 @@ } @end - - diff --git a/Source/x11/XGDragView.m b/Source/x11/XGDragView.m index a6d849e..4854c92 100644 --- a/Source/x11/XGDragView.m +++ b/Source/x11/XGDragView.m @@ -485,7 +485,7 @@ static XGDragView *sharedDragView = nil; [self setExcludedFromWindowsMenu: YES]; } -- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin +- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (NSInteger)otherWin { XSetWindowAttributes winattrs; unsigned long valuemask; diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index e16bc02..9c53c8d 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -1345,9 +1345,19 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg) window->visibility = -1; window->wm_state = NormalState; if (window->ident) - XGetGeometry(dpy, window->ident, &window->root, - &x, &y, &width, &height, - &window->border, &window->depth); + { + XGetGeometry(dpy, window->ident, &window->root, + &x, &y, &width, &height, + &window->border, &window->depth); + } + else + { + NSLog(@"Failed to get root window"); + x = 0; + y = 0; + width = 0; + height = 0; + } window->xframe = NSMakeRect(x, y, width, height); NSMapInsert (windowtags, (void*)(uintptr_t)window->number, window); @@ -2526,7 +2536,7 @@ NSLog(@"styleoffsets ... guessing offsets\n"); if (!window) return; - NSDebugLLog(@"XGTrace", @"DPSwindowbacking: %@ : %d", type, win); + NSDebugLLog(@"XGTrace", @"DPSwindowbacking: %d : %d", type, win); if ((window->gdriverProtocol & GDriverHandlesBacking)) { @@ -3908,7 +3918,7 @@ static BOOL didCreatePixmaps; } /** Sets the transparancy value for the whole window */ -- (void) setalpha: (float)alpha: (int) win +- (void) setalpha: (float)alpha : (int) win { gswindow_device_t *window = WINDOW_WITH_TAG(win); static Atom opacity_atom = None;