From aea2927168d93b26c9d5363c335b29bbe536e3ed Mon Sep 17 00:00:00 2001 From: FredKiefer Date: Mon, 1 Sep 2003 18:17:52 +0000 Subject: [PATCH] Removed new GCC 3.4 warnings from Alexander Malmbergs list. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17601 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 23 +++++++++++++++++++++++ Source/NSApplication.m | 8 ++++---- Source/NSBezierPath.m | 2 +- Source/NSClipView.m | 5 ++--- Source/NSColorPicker.m | 1 + Source/NSDocumentController.m | 2 +- Source/NSInputManager.m | 1 + Source/NSMenuItem.m | 2 +- Source/NSSavePanel.m | 4 ++-- Source/NSTableView.m | 1 + 10 files changed, 37 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d42fb7447..fd2c2f930 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2003-09-01 Fred Kiefer + + * Source/NSAttributedString.m + [readFromURL:options:documentAttributes:] corrected the handling + to type "text", where [NSString alloc] was missing. + * Source/NSBundleAdditions.m + Removed unused global currentVersion. + * Headers/AppKit/NSCell.h + Corrected type of method _nonAutoreleasedTypingAttributes + * Headers/AppKit/NSInputManager.h + Added protocol NSTextInput to ivar _currentClient. + * Headers/AppKit/NSTextFieldCell.h + Removed uneeded and inconsistent method declarations. + * Source/NSApplciation.m + * Source/NSBezierPath.m + * Source/NSClipView.m + * Source/NSDocumentController.m + * Source/NSInputManager.m + * Source/NSMenuItem.m + * Source/NSSavePanel.m + * Source/NSTableView.m + Removed new GCC 3.4 warnings from Alexander Malmbergs list. + 2003-09-01 Fred Kiefer * Source/NSBitmapImageRep.m diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 4a8eccbdf..d9b669c13 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -1905,7 +1905,7 @@ image. count = [itemArray count]; for (i = 0; i < count; i++) { - id win = [[itemArray objectAtIndex: i] target]; + id win = [(NSMenuItem*)[itemArray objectAtIndex: i] target]; if ([win isKindOfClass: [NSWindow class]]) { @@ -2103,7 +2103,7 @@ image. count = [itemArray count]; while (count-- > 0) { - id item = [itemArray objectAtIndex: count]; + NSMenuItem *item = [itemArray objectAtIndex: count]; if ([item target] == aWindow) { @@ -2173,7 +2173,7 @@ image. count = [itemArray count]; for (i = 0; i < count; i++) { - id item = [itemArray objectAtIndex: i]; + NSMenuItem *item = [itemArray objectAtIndex: i]; if ([item target] == aWindow) { @@ -2262,7 +2262,7 @@ image. count = [itemArray count]; for (i = 0; i < count; i++) { - id item = [itemArray objectAtIndex: i]; + NSMenuItem *item = [itemArray objectAtIndex: i]; if ([item target] == aWindow) { diff --git a/Source/NSBezierPath.m b/Source/NSBezierPath.m index ced81d582..0710abb39 100644 --- a/Source/NSBezierPath.m +++ b/Source/NSBezierPath.m @@ -97,7 +97,7 @@ static float default_miter_limit = 10.0; } } -+ (id)bezierPath ++ (NSBezierPath *)bezierPath { return AUTORELEASE ([[NSBezierPath_concrete_class alloc] init]); } diff --git a/Source/NSClipView.m b/Source/NSClipView.m index 061461d73..78faa6c51 100644 --- a/Source/NSClipView.m +++ b/Source/NSClipView.m @@ -30,16 +30,15 @@ #include "AppKit/NSClipView.h" #include "AppKit/NSCursor.h" #include "AppKit/NSColor.h" -#include "AppKit/NSWindow.h" #include "AppKit/NSGraphics.h" +#include "AppKit/NSTableView.h" +#include "AppKit/NSWindow.h" #include "AppKit/PSOperators.h" #include DEFINE_RINT_IF_MISSING -@class NSTableView; - /* * Return the biggest integral (in device space) rect contained in rect. * Conversion to/from device space is done using view. diff --git a/Source/NSColorPicker.m b/Source/NSColorPicker.m index f9c4f700f..6035f612f 100644 --- a/Source/NSColorPicker.m +++ b/Source/NSColorPicker.m @@ -31,6 +31,7 @@ #include #include "AppKit/NSButtonCell.h" #include "AppKit/NSColorPicker.h" +#include "AppKit/NSImage.h" @implementation NSColorPicker diff --git a/Source/NSDocumentController.m b/Source/NSDocumentController.m index 6582a9297..5a889dc62 100644 --- a/Source/NSDocumentController.m +++ b/Source/NSDocumentController.m @@ -224,7 +224,7 @@ static NSDictionary *TypeInfoForName (NSArray *types, NSString *typeName) return nil; // raise exception? } - return [[_types objectAtIndex:0] objectForKey:NSNameKey]; + return [(NSDictionary*)[_types objectAtIndex:0] objectForKey:NSNameKey]; } - (void) addDocument: (NSDocument *)document diff --git a/Source/NSInputManager.m b/Source/NSInputManager.m index b8d1a9d89..528c8b081 100644 --- a/Source/NSInputManager.m +++ b/Source/NSInputManager.m @@ -23,6 +23,7 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include "AppKit/NSEvent.h" #include "AppKit/NSInputManager.h" #include "AppKit/NSInputServer.h" diff --git a/Source/NSMenuItem.m b/Source/NSMenuItem.m index 06018457f..5204a7e04 100644 --- a/Source/NSMenuItem.m +++ b/Source/NSMenuItem.m @@ -229,7 +229,7 @@ static Class imageClass; - (NSString*) userKeyEquivalent { - NSString *userKeyEquivalent = [[[[NSUserDefaults standardUserDefaults] + NSString *userKeyEquivalent = [(NSDictionary*)[[[NSUserDefaults standardUserDefaults] persistentDomainForName: NSGlobalDomain] objectForKey: @"NSCommandKeys"] objectForKey: _title]; diff --git a/Source/NSSavePanel.m b/Source/NSSavePanel.m index c8de13076..37fa4a824 100644 --- a/Source/NSSavePanel.m +++ b/Source/NSSavePanel.m @@ -1175,7 +1175,7 @@ selectCellWithString: (NSString*)title // NSSavePanel browser delegate methods // @interface NSSavePanel (_BrowserDelegate) -- (void) browser: (id)sender +- (void) browser: (NSBrowser*)sender createRowsForColumn: (int)column inMatrix: (NSMatrix*)matrix; @@ -1207,7 +1207,7 @@ static int compareFilenames (id elem1, id elem2, void *context) @implementation NSSavePanel (_BrowserDelegate) -- (void) browser: (id)sender +- (void) browser: (NSBrowser*)sender createRowsForColumn: (int)column inMatrix: (NSMatrix*)matrix { diff --git a/Source/NSTableView.m b/Source/NSTableView.m index f234f939b..1f3b26734 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -26,6 +26,7 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include