Skip to content

Commit

Permalink
Added warning flag -Wmissing-method-return-type and fixed resultant w…
Browse files Browse the repository at this point in the history
…arnings: Method has no return type specified.
  • Loading branch information
Jonathan Mitchell committed Nov 26, 2012
1 parent e09a74d commit 0435a9e
Show file tree
Hide file tree
Showing 83 changed files with 320 additions and 311 deletions.
19 changes: 14 additions & 5 deletions FScript.xcodeproj/project.pbxproj
Expand Up @@ -3657,7 +3657,6 @@
PRODUCT_NAME = FScript;
SECTORDER_FLAGS = "";
SKIP_INSTALL = YES;
WARNING_CFLAGS = "-Wmost";
WRAPPER_EXTENSION = framework;
ZERO_LINK = NO;
};
Expand Down Expand Up @@ -3694,7 +3693,6 @@
PRODUCT_NAME = FScript;
SECTORDER_FLAGS = "";
SKIP_INSTALL = YES;
WARNING_CFLAGS = "-Wmost";
WRAPPER_EXTENSION = framework;
ZERO_LINK = NO;
};
Expand Down Expand Up @@ -3870,7 +3868,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
Expand All @@ -3885,7 +3883,9 @@
GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MISSING_PARENTHESES = NO;
GCC_WARN_SHADOW = NO;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_WARN_UNDECLARED_SELECTOR = NO;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = NO;
GCC_WARN_UNUSED_VALUE = YES;
Expand All @@ -3894,7 +3894,10 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_LDFLAGS = "";
SDKROOT = macosx;
WARNING_CFLAGS = "-Wmost";
WARNING_CFLAGS = (
"-Wmost",
"-Wmissing-method-return-type",
);
ZERO_LINK = NO;
};
name = Debug;
Expand All @@ -3904,7 +3907,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
Expand All @@ -3913,11 +3916,17 @@
GCC_MODEL_TUNING = "";
GCC_OPTIMIZATION_LEVEL = s;
GCC_VERSION = "";
GCC_WARN_SHADOW = NO;
GCC_WARN_UNDECLARED_SELECTOR = NO;
IBC_FLATTEN_NIBS = NO;
INSTALL_OWNER = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_LDFLAGS = "";
SDKROOT = macosx;
WARNING_CFLAGS = (
"-Wmost",
"-Wmissing-method-return-type",
);
};
name = Release;
};
Expand Down
22 changes: 11 additions & 11 deletions FScriptFramework/Array.m
Expand Up @@ -163,9 +163,9 @@ - (BOOL)containsObject:(id)anObject
assert(0);
}

- copy { assert(0); }
- (id)copy { assert(0); }

- copyWithZone:(NSZone *)zone { assert(0); }
- (id)copyWithZone:(NSZone *)zone { assert(0); }

- (NSUInteger)count
{
Expand Down Expand Up @@ -252,32 +252,32 @@ - (NSUInteger)indexOfObjectIdenticalTo:(id)anObject inRange:(NSRange)range
assert(0);
}

- init
- (id)init
{
assert(0);
}

- initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step
- (id)initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step
{
assert(0);
}

- initFilledWith:(id)elem count:(NSUInteger)nb
- (id)initFilledWith:(id)elem count:(NSUInteger)nb
{
assert(0);
}

- initWithCapacity:(NSUInteger)aNumItems
- (id)initWithCapacity:(NSUInteger)aNumItems
{
assert(0);
}

- initWithObject:(id)object
- (id)initWithObject:(id)object
{
assert(0);
}

- initWithObjects:(id *)objects count:(NSUInteger)nb
- (id)initWithObjects:(id *)objects count:(NSUInteger)nb
{
assert(0);
}
Expand All @@ -302,12 +302,12 @@ - (BOOL) isEqualToArray:(NSArray *)anArray
assert(0);
}

- mutableCopyWithZone:(NSZone *)zone
- (id)mutableCopyWithZone:(NSZone *)zone
{
assert(0);
}

- objectAtIndex:(NSUInteger)index
- (id)objectAtIndex:(NSUInteger)index
{
assert(0);
}
Expand Down Expand Up @@ -373,7 +373,7 @@ - (enum ArrayRepType)type { assert(0); } // declared in ArrayPrivate

-(NSUInteger) _ul_count { assert(0); }

- _ul_objectAtIndex:(NSUInteger)index
- (id)_ul_objectAtIndex:(NSUInteger)index
{
assert(0);
}
Expand Down
4 changes: 2 additions & 2 deletions FScriptFramework/ArrayPrivate.h
Expand Up @@ -15,8 +15,8 @@
- (id)arrayRep;
- (void)becomeArrayOfId;
- (void *)dataPtr;
- initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step;
- initFilledWith:(id)elem count:(NSUInteger)nb;
- (id)initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step;
- (id)initFilledWith:(id)elem count:(NSUInteger)nb;
- (FSArray *)initWithRep:(id)theRep;
- (FSArray *)initWithRepNoRetain:(id)theRep;
- (enum ArrayRepType)type;
Expand Down
4 changes: 2 additions & 2 deletions FScriptFramework/ArrayRep.h
Expand Up @@ -18,8 +18,8 @@
- (NSString *)descriptionLimited:(NSUInteger)nbElem;
- (FSArray *) distinctId;
- (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range identical:(BOOL)identical;
- indexWithArray:(FSArray *)index;
- (id)operator_backslash:(FSBlock*)bl; // precond: ![bl isProxy] && count != 0
- (id)indexWithArray:(FSArray *)index;
- (id)operator_backslash:(FSBlock*)bl; // precond: ![bl isProxy] && count != 0
- (void)removeLastElem;
- (void)removeElemAtIndex:(NSUInteger)index;
- (FSArray *)replicateWithArray:(FSArray *)operand;
Expand Down
12 changes: 6 additions & 6 deletions FScriptFramework/ArrayRepBoolean.h
Expand Up @@ -17,12 +17,12 @@
- (void)addBoolean:(char)aBoolean;
- (char *)booleansPtr;
- (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range identical:(BOOL)identical;
- init;
- initFilledWithBoolean:(char)elem count:(NSUInteger)nb; // contract: a return value of nil means not enough memory
- initWithCapacity:(NSUInteger)aNumItems; // contract: a return value of nil means not enough memory
- initWithBooleans:(char *)elems count:(NSUInteger)nb;
- initWithBooleansNoCopy:(char *)tab count:(NSUInteger)nb;
- copyWithZone:(NSZone *)zone;
- (id)init;
- (id)initFilledWithBoolean:(char)elem count:(NSUInteger)nb; // contract: a return value of nil means not enough memory
- (id)initWithCapacity:(NSUInteger)aNumItems; // contract: a return value of nil means not enough memory
- (id)initWithBooleans:(char *)elems count:(NSUInteger)nb;
- (id)initWithBooleansNoCopy:(char *)tab count:(NSUInteger)nb;
- (id)copyWithZone:(NSZone *)zone;
- (void)replaceBooleanAtIndex:(NSUInteger)index withBoolean:(char)aBoolean;
- (enum ArrayRepType)repType;

Expand Down
12 changes: 6 additions & 6 deletions FScriptFramework/ArrayRepBoolean.m
Expand Up @@ -184,7 +184,7 @@ - (ArrayRepId *) asArrayRepId

- (char *)booleansPtr {return t;}

- copyWithZone:(NSZone *)zone
- (id)copyWithZone:(NSZone *)zone
{
return [[ArrayRepBoolean allocWithZone:zone] initWithBooleans:t count:count];
}
Expand Down Expand Up @@ -220,9 +220,9 @@ - (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range identical:(BOOL)
}
}

- init { return [self initWithCapacity:0]; }
- (id)init { return [self initWithCapacity:0]; }

- initFilledWithBoolean:(char)elem count:(NSUInteger)nb // contract: a return value of nil means not enough memory
- (id)initFilledWithBoolean:(char)elem count:(NSUInteger)nb // contract: a return value of nil means not enough memory
{
if (self = [self initWithCapacity:nb])
{
Expand All @@ -232,7 +232,7 @@ - (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range identical:(BOOL)
return nil;
}

- initWithCapacity:(NSUInteger)aNumItems // contract: a return value of nil means not enough memory
- (id)initWithCapacity:(NSUInteger)aNumItems // contract: a return value of nil means not enough memory
{
if ((self = [super init]))
{
Expand All @@ -250,7 +250,7 @@ - (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range identical:(BOOL)
return nil;
}

- initWithBooleans:(char *)elems count:(NSUInteger)nb
- (id)initWithBooleans:(char *)elems count:(NSUInteger)nb
{
if (self = [self initWithCapacity:nb])
{
Expand All @@ -261,7 +261,7 @@ - (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range identical:(BOOL)
return nil;
}

- initWithBooleansNoCopy:(char *)tab count:(NSUInteger)nb
- (id)initWithBooleansNoCopy:(char *)tab count:(NSUInteger)nb
{
if ((self = [super init]))
{
Expand Down
16 changes: 8 additions & 8 deletions FScriptFramework/ArrayRepDouble.h
Expand Up @@ -14,20 +14,20 @@
}


+ arrayRepDoubleWithCapacity:(NSUInteger)aNumItems;
+ (id)arrayRepDoubleWithCapacity:(NSUInteger)aNumItems;

- (void)addDouble:(double)aDouble;
- (void)addDoublesFromFSArray:(FSArray *)otherArray;
- (NSString *)descriptionLimited:(NSUInteger)nbElem;
- (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range identical:(BOOL)identical;
- init;
- initFilledWithDouble:(double)elem count:(NSUInteger)nb; // contract: a return value of nil means not enough memory
- initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step; // contract: a return value of nil means not enough memory
- initWithCapacity:(NSUInteger)aNumItems; // contract: a return value of nil means not enough memory
- initWithDoubles:(double *)elems count:(NSUInteger)nb;
- initWithDoublesNoCopy:(double *)tab count:(NSUInteger)nb;
- (id)init;
- (id)initFilledWithDouble:(double)elem count:(NSUInteger)nb; // contract: a return value of nil means not enough memory
- (id)initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step; // contract: a return value of nil means not enough memory
- (id)initWithCapacity:(NSUInteger)aNumItems; // contract: a return value of nil means not enough memory
- (id)initWithDoubles:(double *)elems count:(NSUInteger)nb;
- (id)initWithDoublesNoCopy:(double *)tab count:(NSUInteger)nb;
- (void)insertDouble:(double)aDouble atIndex:(NSUInteger)index;
- copyWithZone:(NSZone *)zone;
- (id)copyWithZone:(NSZone *)zone;
- (double *)doublesPtr;
- (void)replaceDoubleAtIndex:(NSUInteger)index withDouble:(double)aDouble;
- (enum ArrayRepType)repType;
Expand Down
18 changes: 9 additions & 9 deletions FScriptFramework/ArrayRepDouble.m
Expand Up @@ -894,7 +894,7 @@ - (FSArray *)simpleLoop_truncated
/////////////////////////////// OTHER METHODS //////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

+ arrayRepDoubleWithCapacity:(NSUInteger)aNumItems
+ (id)arrayRepDoubleWithCapacity:(NSUInteger)aNumItems
{
return [[[self alloc] initWithCapacity:aNumItems] autorelease];
}
Expand Down Expand Up @@ -938,7 +938,7 @@ - (ArrayRepId *) asArrayRepId
return r;
}

- copyWithZone:(NSZone *)zone
- (id)copyWithZone:(NSZone *)zone
{
return [[ArrayRepDouble allocWithZone:zone] initWithDoubles:t count:count];
}
Expand Down Expand Up @@ -987,7 +987,7 @@ - (NSString *)descriptionLimited:(NSUInteger)nbElem
return str;
}

- indexWithArray:(FSArray *)index
- (id)indexWithArray:(FSArray *)index
{
assert(![index isProxy]);

Expand Down Expand Up @@ -1121,9 +1121,9 @@ - (NSString *)descriptionLimited:(NSUInteger)nbElem
return nil; //W
}

- init { return [self initWithCapacity:0]; }
- (id)init { return [self initWithCapacity:0]; }

- initFilledWithDouble:(double)elem count:(NSUInteger)nb // contract: a return value of nil means not enough memory
- (id)initFilledWithDouble:(double)elem count:(NSUInteger)nb // contract: a return value of nil means not enough memory
{
if (self = [self initWithCapacity:nb])
{
Expand All @@ -1133,7 +1133,7 @@ - (NSString *)descriptionLimited:(NSUInteger)nbElem
return nil;
}

- initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step // contract: a return value of nil means not enough memory
- (id)initFrom:(NSUInteger)from to:(NSUInteger)to step:(NSUInteger)step // contract: a return value of nil means not enough memory
{
if (to < from) return [self init];

Expand All @@ -1153,7 +1153,7 @@ - (NSString *)descriptionLimited:(NSUInteger)nbElem
return nil;
}

- initWithCapacity:(NSUInteger)aNumItems // contract: a return value of nil means not enough memory
- (id)initWithCapacity:(NSUInteger)aNumItems // contract: a return value of nil means not enough memory
{
if (self = [super init])
{
Expand All @@ -1171,7 +1171,7 @@ - (NSString *)descriptionLimited:(NSUInteger)nbElem
return nil;
}

- initWithDoubles:(double *)elems count:(NSUInteger)nb
- (id)initWithDoubles:(double *)elems count:(NSUInteger)nb
{
if ((self = [self initWithCapacity:nb]))
{
Expand All @@ -1182,7 +1182,7 @@ - (NSString *)descriptionLimited:(NSUInteger)nbElem
return nil;
}

- initWithDoublesNoCopy:(double *)tab count:(NSUInteger)nb
- (id)initWithDoublesNoCopy:(double *)tab count:(NSUInteger)nb
{
if ((self = [super init]))
{
Expand Down
4 changes: 2 additions & 2 deletions FScriptFramework/ArrayRepEmpty.h
Expand Up @@ -22,7 +22,7 @@

- (ArrayRepDouble *) asArrayRepDouble;
- (ArrayRepBoolean *) asArrayRepBoolean;
- init;
- initWithCapacity:(NSUInteger)aNumItems;
- (id)init;
- (id)initWithCapacity:(NSUInteger)aNumItems;

@end
10 changes: 5 additions & 5 deletions FScriptFramework/ArrayRepEmpty.m
Expand Up @@ -28,7 +28,7 @@ - (FSArray *)sort {return [FSArray array];}
/////////////////////////////// OTHER METHODS //////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

+ arrayRepEmptyWithCapacity:(NSUInteger)aNumItems
+ (id)arrayRepEmptyWithCapacity:(NSUInteger)aNumItems
{
return [[[self alloc] initWithCapacity:aNumItems] autorelease];
}
Expand All @@ -47,7 +47,7 @@ - (ArrayRepDouble *) asArrayRepDouble { return [[[ArrayRepDouble alloc] initWi

- (ArrayRepId *) asArrayRepId { return [[[ArrayRepId alloc] initWithCapacity:capacity] autorelease]; }

- copyWithZone:(NSZone *)zone
- (id)copyWithZone:(NSZone *)zone
{
return [[ArrayRepEmpty allocWithZone:zone] initWithCapacity:capacity];
}
Expand All @@ -56,11 +56,11 @@ - (NSUInteger)count {return 0;}

- (NSString *)descriptionLimited:(NSUInteger)nbElem { return @"{}" ; }

- indexWithArray:(FSArray *)index {return [FSArray array];}
- (id)indexWithArray:(FSArray *)index {return [FSArray array];}

- init { return [self initWithCapacity:0]; }
- (id)init { return [self initWithCapacity:0]; }

- initWithCapacity:(NSUInteger)aNumItems
- (id)initWithCapacity:(NSUInteger)aNumItems
{
if ((self = [super init]))
{
Expand Down
4 changes: 2 additions & 2 deletions FScriptFramework/ArrayRepFetchRequest.h
Expand Up @@ -14,9 +14,9 @@
+ (ArrayRepFetchRequest *) arrayRepFetchRequestWithFetchRequest:(NSFetchRequest *)theFetchRequest objectContext:(NSManagedObjectContext *)theObjectContext;

- (ArrayRepId *) asArrayRepId;
- copyWithZone:(NSZone *)zone;
- (id)copyWithZone:(NSZone *)zone;
- (void)dealloc;
- initWithFetchRequest:(NSFetchRequest *)theFetchRequest objectContext:(NSManagedObjectContext *)theObjectContext;
- (id)initWithFetchRequest:(NSFetchRequest *)theFetchRequest objectContext:(NSManagedObjectContext *)theObjectContext;
- (enum ArrayRepType) repType;

@end

0 comments on commit 0435a9e

Please sign in to comment.