diff --git a/ChangeLog b/ChangeLog index 4d1f4e809..de7ae874b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,26 @@ +2010-04-10 Fred Kiefer + + * Source/linking.m + * Source/GSDisplayServer.m + * Source/NSWorkspace.m + * Source/NSButtonCell.m + * Source/NSSplitView.m + * Source/GSNibLoading.m + * Source/NSCursor.m + * Source/NSScroller.m + * Source/NSOutlineView.m + * Source/GSToolbarView.m + * Source/GSPDFPrintOperation.m + * Source/GSThemePanel.m + * Source/NSImage.m + * Source/NSTableView.m + * Source/GSDragView.m: Remove compiler warnings detected by clang + and reported by David Chisnall . + 2010-04-09 David Ayers * Headers/AppKit/NSSound.h: Import NSBundle.h for category declaration. - + 2010-04-08 Jonathan Gillaspie * Source/GSToolTips.m: Prevent Windows API callback from crashing when displaying tooltips. diff --git a/Source/GSDisplayServer.m b/Source/GSDisplayServer.m index c6f2e4e4e..b5f4fa1fe 100644 --- a/Source/GSDisplayServer.m +++ b/Source/GSDisplayServer.m @@ -26,23 +26,24 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include +#import +#import +#import +#import +#import +#import +#import +#import +#import -#include "AppKit/NSApplication.h" -#include "AppKit/NSEvent.h" -#include "AppKit/NSImage.h" -#include "AppKit/NSWindow.h" -#include "GNUstepGUI/GSDisplayServer.h" -#include "GNUstepGUI/GSDragView.h" +#import "AppKit/NSApplication.h" +#import "AppKit/NSEvent.h" +#import "AppKit/NSImage.h" +#import "AppKit/NSWindow.h" +#import "GNUstepGUI/GSDisplayServer.h" +#import "GNUstepGUI/GSDragView.h" -#include "GSSlideView.h" +#import "GSSlideView.h" /* Display attributes */ NSString * GSDisplayName = @"DisplayName"; diff --git a/Source/GSDragView.m b/Source/GSDragView.m index 185b5bcb7..5a2d6034b 100644 --- a/Source/GSDragView.m +++ b/Source/GSDragView.m @@ -623,7 +623,7 @@ static GSDragView *sharedDragView = nil; startPoint = [eWindow convertBaseToScreen: [theEvent locationInWindow]]; startPoint.x -= offset.width; startPoint.y -= offset.height; - NSDebugLLog(@"NSDragging", @"Drag window origin %d %d\n", startPoint.x, startPoint.y); + NSDebugLLog(@"NSDragging", @"Drag window origin %@\n", NSStringFromPoint(startPoint)); // Notify the source that dragging has started if ([dragSource respondsToSelector: @@ -888,7 +888,7 @@ static GSDragView *sharedDragView = nil; dragPoint = [destWindow convertScreenToBase: dragPosition]; } - NSDebugLLog(@"NSDragging", @"mouse window %d (%x) at %@\n", + NSDebugLLog(@"NSDragging", @"mouse window %d (%@) at %@\n", mouseWindowRef, destWindow, NSStringFromPoint(dragPosition)); //--- send exit message if necessary ------------------------------------- diff --git a/Source/GSNibLoading.m b/Source/GSNibLoading.m index 77d1b93b8..da7063ee0 100644 --- a/Source/GSNibLoading.m +++ b/Source/GSNibLoading.m @@ -46,6 +46,7 @@ #import #import #import +#import #import // FIXME: Used for NSKeyedArchiver access. All this should be moved into base. diff --git a/Source/GSPDFPrintOperation.m b/Source/GSPDFPrintOperation.m index 5cba4f16e..0721cbcb5 100644 --- a/Source/GSPDFPrintOperation.m +++ b/Source/GSPDFPrintOperation.m @@ -33,12 +33,14 @@ */ -#include -#include -#include -#include -#include "AppKit/NSView.h" -#include "GNUstepGUI/GSPDFPrintOperation.h" +#import +#import +#import +#import +#import +#import "AppKit/NSPrintInfo.h" +#import "AppKit/NSView.h" +#import "GNUstepGUI/GSPDFPrintOperation.h" /** diff --git a/Source/GSThemePanel.m b/Source/GSThemePanel.m index 6f33ad67a..e86a72214 100644 --- a/Source/GSThemePanel.m +++ b/Source/GSThemePanel.m @@ -26,15 +26,16 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include "AppKit/NSButton.h" -#include "AppKit/NSMatrix.h" -#include "AppKit/NSScrollView.h" -#include "GSThemePrivate.h" -#include "GSGuiPrivate.h" +#import +#import +#import +#import +#import +#import "AppKit/NSButton.h" +#import "AppKit/NSMatrix.h" +#import "AppKit/NSScrollView.h" +#import "GSThemePrivate.h" +#import "GSGuiPrivate.h" @implementation GSThemePanel diff --git a/Source/GSToolbarView.m b/Source/GSToolbarView.m index 588ef7110..d85cfa9a5 100644 --- a/Source/GSToolbarView.m +++ b/Source/GSToolbarView.m @@ -343,7 +343,7 @@ static void initSystemExtensionsColors(void) [(NSToolbarItem *)[[info draggingSource] toolbarItem] itemIdentifier]; if ([self _insertionIndexAtPoint: [info draggingLocation]] != NSNotFound - && [allowedItemIdentifiers containsObject: itemIdentifier]); + && [allowedItemIdentifiers containsObject: itemIdentifier]) { return NSDragOperationGeneric; } @@ -360,7 +360,7 @@ static void initSystemExtensionsColors(void) [(NSToolbarItem *)[[info draggingSource] toolbarItem] itemIdentifier]; if ([self _insertionIndexAtPoint: [info draggingLocation]] != NSNotFound - && [allowedItemIdentifiers containsObject: itemIdentifier]); + && [allowedItemIdentifiers containsObject: itemIdentifier]) { return NSDragOperationGeneric; } diff --git a/Source/NSButtonCell.m b/Source/NSButtonCell.m index 0f15acc96..7979729ac 100644 --- a/Source/NSButtonCell.m +++ b/Source/NSButtonCell.m @@ -1550,7 +1550,7 @@ typedef struct _GSButtonCellFlags [aCoder encodeInt: bFlags forKey: @"NSButtonFlags"]; // style and border. - bFlags2 != [self showsBorderOnlyWhileMouseInside] ? 0x8 : 0; + bFlags2 |= [self showsBorderOnlyWhileMouseInside] ? 0x8 : 0; bFlags2 |= (([self bezelStyle] & 0x7) | (([self bezelStyle] & 0x18) << 2)); bFlags2 |= [self keyEquivalentModifierMask] << 8; [aCoder encodeInt: bFlags2 forKey: @"NSButtonFlags2"]; diff --git a/Source/NSCursor.m b/Source/NSCursor.m index 9074805c1..0753346fc 100644 --- a/Source/NSCursor.m +++ b/Source/NSCursor.m @@ -30,6 +30,7 @@ #include #include +#include #include #include "AppKit/NSColor.h" diff --git a/Source/NSImage.m b/Source/NSImage.m index 7ed028c1f..8153989a9 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -1897,19 +1897,19 @@ iterate_reps_for_types(NSArray* imageReps, SEL method) { if (repd->bg == nil) { - NSDebugLLog(@"NSImage", @"Invalid %@ ... %@ %d", + NSDebugLLog(@"NSImage", @"Invalid %@ ... %@ %@", repd->bg, _color, repd->rep); invalidCache = repd; } else if (opaque == YES || [repd->bg isEqual: _color] == YES) { - NSDebugLLog(@"NSImage", @"Exact %@ ... %@ %d", + NSDebugLLog(@"NSImage", @"Exact %@ ... %@ %@", repd->bg, _color, repd->rep); return repd; } else { - NSDebugLLog(@"NSImage", @"Partial %@ ... %@ %d", + NSDebugLLog(@"NSImage", @"Partial %@ ... %@ %@", repd->bg, _color, repd->rep); partialCache = repd; partialCount++; diff --git a/Source/NSOutlineView.m b/Source/NSOutlineView.m index 5e5d65ead..c000f5568 100644 --- a/Source/NSOutlineView.m +++ b/Source/NSOutlineView.m @@ -39,6 +39,7 @@ #import #import #import +#import #import #import diff --git a/Source/NSScroller.m b/Source/NSScroller.m index eb51ea5db..0420c0767 100644 --- a/Source/NSScroller.m +++ b/Source/NSScroller.m @@ -1003,7 +1003,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset [theCell highlight: YES withFrame: rect inView: self]; [_window flushWindow]; - NSDebugLog (@"tracking cell %x", theCell); + NSDebugLog (@"tracking cell %@", theCell); /* * The "tracking" in this method actually takes place within diff --git a/Source/NSSplitView.m b/Source/NSSplitView.m index 4df3eb299..216f9c61d 100644 --- a/Source/NSSplitView.m +++ b/Source/NSSplitView.m @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 5c6f1887f..1f3e06055 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -93,9 +93,9 @@ typedef struct _tableViewFlags unsigned int emptySelection:1; unsigned int multipleSelection:1; unsigned int columnSelection:1; - unsigned int __unused:26; + unsigned int _unused:26; #else - unsigned int __unused:26; + unsigned int _unused:26; unsigned int columnSelection:1; unsigned int multipleSelection:1; unsigned int emptySelection:1; diff --git a/Source/NSWorkspace.m b/Source/NSWorkspace.m index ca2edd808..46b28dbe2 100644 --- a/Source/NSWorkspace.m +++ b/Source/NSWorkspace.m @@ -1643,8 +1643,8 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath - (NSArray*) mountedLocalVolumePaths { NSMutableArray *names; - NSFileManager *mgr = [NSFileManager defaultManager]; #if defined(__MINGW32__) + NSFileManager *mgr = [NSFileManager defaultManager]; unsigned max = BUFSIZ; unichar buf[max]; unichar *base = buf; @@ -1679,6 +1679,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath } #elif defined(HAVE_GETMNTENT) && defined (MNT_MEMB) + NSFileManager *mgr = [NSFileManager defaultManager]; FILE *fptr = fopen("/etc/mtab", "r"); struct mntent *m; diff --git a/Source/linking.m b/Source/linking.m index 529d28bf3..4f7360150 100644 --- a/Source/linking.m +++ b/Source/linking.m @@ -1,6 +1,7 @@ -#include -#include "AppKit/AppKit.h" +#import +#import "AppKit/AppKit.h" +#import "GNUstepGUI/GSFontInfo.h" void __objc_gui_linking(void) {