From 9b5dd100d04e8b29ae3f011908a9cc6da70a85cd Mon Sep 17 00:00:00 2001 From: rfm Date: Sun, 28 Oct 2012 12:32:35 +0000 Subject: [PATCH] fix compiler warnings git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@35757 72102866-910b-0410-8b05-ffd578937521 --- Command.m | 5 ++++- Console.m | 5 ++++- Control.m | 5 ++++- EcCommand.m | 3 +-- EcUserDefaults.m | 7 ++++--- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Command.m b/Command.m index 99b611a..68956bf 100644 --- a/Command.m +++ b/Command.m @@ -35,7 +35,10 @@ #define EC_BASE_CLASS EcCommand #endif -@class EC_BASE_CLASS; +/* Create a fake interface to satisfy compiler ... + */ +@interface EC_BASE_CLASS : EcProcess +@end void inner_main() diff --git a/Console.m b/Console.m index c65b8c3..abd0afa 100644 --- a/Console.m +++ b/Console.m @@ -35,7 +35,10 @@ #define EC_BASE_CLASS EcConsole #endif -@class EC_BASE_CLASS; +/* Create a fake interface to satisfy compiler ... + */ +@interface EC_BASE_CLASS : EcProcess +@end void inner_main() diff --git a/Control.m b/Control.m index 822bed6..47a393a 100644 --- a/Control.m +++ b/Control.m @@ -35,7 +35,10 @@ #define EC_BASE_CLASS EcControl #endif -@class EC_BASE_CLASS; +/* Create a fake interface to satisfy compiler ... + */ +@interface EC_BASE_CLASS : EcProcess +@end void inner_main() diff --git a/EcCommand.m b/EcCommand.m index 7ee78cc..90e4933 100644 --- a/EcCommand.m +++ b/EcCommand.m @@ -913,7 +913,6 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) for (i = 0; i < [a count]; i++) { EcClientI *c = [a objectAtIndex: i]; - BOOL found = NO; NS_DURING { @@ -956,7 +955,7 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) } } } - if (found == NO) + if (NO == found) { m = [NSString stringWithFormat: @"Nothing to shut down as '%@'\n", wd]; diff --git a/EcUserDefaults.m b/EcUserDefaults.m index d83c03f..bfb45d9 100644 --- a/EcUserDefaults.m +++ b/EcUserDefaults.m @@ -27,6 +27,7 @@ */ +#import #import #import #import @@ -299,9 +300,9 @@ static NSLock *lock = nil; - (BOOL) setCommand: (id)val forKey: (NSString*)key { - NSDictionary *old = [self volatileDomainForName: @"EcCommand"]; - NSDictionary *new = nil; - NSString *pre = [self defaultsPrefix]; + NSDictionary *old = [self volatileDomainForName: @"EcCommand"]; + NSMutableDictionary *new = nil; + NSString *pre = [self defaultsPrefix]; /* Make sure prefix is used if we have one set. */