Permalink
Browse files

Fixed compiler warnings after upgrading to Xcode 4.3. Closes #186.

  • Loading branch information...
1 parent c49e3ad commit a136f4dfe2a7c379e0a677a2c5fae850b5942c60 @tomaz committed Feb 25, 2012
View
2 AppledocTests-Info.plist
@@ -17,6 +17,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>765</string>
+ <string>771</string>
</dict>
</plist>
View
6 Application/GBAppledocApplication.m
@@ -573,11 +573,11 @@ - (void)injectSettingsFromSettingsFile:(NSString *)path usingBlock:(BOOL (^)(NSS
NSError* error = nil;
NSData* data = [NSData dataWithContentsOfFile:path options:0 error:&error];
if (!data) [NSException raise:@"Failed reading settings from '%@'!", path];
- NSDictionary *settings = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:NULL error:&error];
- if (!settings) [NSException raiseWithError:error format:@"Failed reaing settings plist from '%@'!", path];
+ NSDictionary *theSettings = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:NULL error:&error];
+ if (!theSettings) [NSException raiseWithError:error format:@"Failed reaing settings plist from '%@'!", path];
// We first pass each option and it's value to the block. The block can return YES to allow handling it, NO otherwise. It can also pass back a different value (we're passing a pointer to the value!).
- [settings enumerateKeysAndObjectsUsingBlock:^(NSString *option, id value, BOOL *stop) {
+ [theSettings enumerateKeysAndObjectsUsingBlock:^(NSString *option, id value, BOOL *stop) {
while ([option hasPrefix:@"-"]) option = [option substringFromIndex:1];
NSString *key = [DDGetoptLongParser keyFromOption:option];
if (!block(option, &value, stop)) return;
View
2 Application/GBApplicationStringsProvider.m
@@ -139,7 +139,7 @@ - (NSDictionary *)appledocData {
result = [[NSMutableDictionary alloc] init];
[result setObject:@"appledoc" forKey:@"tool"];
[result setObject:@"2.0.5" forKey:@"version"];
- [result setObject:@"765" forKey:@"build"];
+ [result setObject:@"771" forKey:@"build"];
[result setObject:@"http://appledoc.gentlebytes.com" forKey:@"homepage"];
}
return result;
View
12 Generating/GBGenerator.m
@@ -46,11 +46,11 @@ - (id)initWithSettingsProvider:(id)settingsProvider {
#pragma mark Generation handling
-- (void)generateOutputFromStore:(id)store {
- NSParameterAssert(store != nil);
+- (void)generateOutputFromStore:(id)aStore {
+ NSParameterAssert(aStore != nil);
GBLogInfo(@"Generating output from parsed objects...");
- [self setupGeneratorStepsWithStore:store];
- [self runGeneratorStepsWithStore:store];
+ [self setupGeneratorStepsWithStore:aStore];
+ [self runGeneratorStepsWithStore:aStore];
}
- (void)setupGeneratorStepsWithStore:(id)store {
@@ -66,7 +66,7 @@ - (void)setupGeneratorStepsWithStore:(id)store {
[self.outputGenerators addObject:[GBDocSetPublishGenerator generatorWithSettingsProvider:self.settings]];
}
-- (void)runGeneratorStepsWithStore:(id)store {
+- (void)runGeneratorStepsWithStore:(id)aStore {
GBLogDebug(@"Running generation steps...");
NSUInteger stepsCount = [self.outputGenerators count];
if (stepsCount == 0) {
@@ -85,7 +85,7 @@ - (void)runGeneratorStepsWithStore:(id)store {
*stop = YES;
return;
}
- if (![generator generateOutputWithStore:store error:&error]) {
+ if (![generator generateOutputWithStore:aStore error:&error]) {
GBLogNSError(error, @"Generation step %ld/%ld failed: %@ failed generaing output, aborting!", index, stepsCount, [generator className]);
*stop = YES;
return;
View
24 Generating/GBHTMLTemplateVariablesProvider.m
@@ -93,8 +93,8 @@ - (id)initWithSettingsProvider:(id)settingsProvider {
#pragma mark Object variables handling
-- (NSDictionary *)variablesForClass:(GBClassData *)object withStore:(id)store {
- self.store = store;
+- (NSDictionary *)variablesForClass:(GBClassData *)object withStore:(id)aStore {
+ self.store = aStore;
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForClass:object] forKey:@"title"];
[page setObject:[self specificationsForClass:object] forKey:@"specifications"];
@@ -108,8 +108,8 @@ - (NSDictionary *)variablesForClass:(GBClassData *)object withStore:(id)store {
return result;
}
-- (NSDictionary *)variablesForCategory:(GBCategoryData *)object withStore:(id)store {
- self.store = store;
+- (NSDictionary *)variablesForCategory:(GBCategoryData *)object withStore:(id)aStore {
+ self.store = aStore;
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForCategory:object] forKey:@"title"];
[page setObject:[self specificationsForCategory:object] forKey:@"specifications"];
@@ -124,8 +124,8 @@ - (NSDictionary *)variablesForCategory:(GBCategoryData *)object withStore:(id)st
return result;
}
-- (NSDictionary *)variablesForProtocol:(GBProtocolData *)object withStore:(id)store {
- self.store = store;
+- (NSDictionary *)variablesForProtocol:(GBProtocolData *)object withStore:(id)aStore {
+ self.store = aStore;
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForProtocol:object] forKey:@"title"];
[page setObject:[self specificationsForProtocol:object] forKey:@"specifications"];
@@ -139,8 +139,8 @@ - (NSDictionary *)variablesForProtocol:(GBProtocolData *)object withStore:(id)st
return result;
}
-- (NSDictionary *)variablesForDocument:(GBDocumentData *)object withStore:(id)store {
- self.store = store;
+- (NSDictionary *)variablesForDocument:(GBDocumentData *)object withStore:(id)aStore {
+ self.store = aStore;
NSString *path = [self.settings htmlRelativePathToIndexFromObject:object];
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForDocument:object] forKey:@"title"];
@@ -159,8 +159,8 @@ - (NSDictionary *)variablesForDocument:(GBDocumentData *)object withStore:(id)st
#pragma mark Index variables handling
-- (NSDictionary *)variablesForIndexWithStore:(id)store {
- self.store = store;
+- (NSDictionary *)variablesForIndexWithStore:(id)aStore {
+ self.store = aStore;
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForIndex] forKey:@"title"];
[self addFooterVarsToDictionary:page];
@@ -178,8 +178,8 @@ - (NSDictionary *)variablesForIndexWithStore:(id)store {
return result;
}
-- (NSDictionary *)variablesForHierarchyWithStore:(id)store {
- self.store = store;
+- (NSDictionary *)variablesForHierarchyWithStore:(id)aStore {
+ self.store = aStore;
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForHierarchy] forKey:@"title"];
[self addFooterVarsToDictionary:page];
View
4 Generating/GBOutputGenerator.m
@@ -39,9 +39,9 @@ - (id)initWithSettingsProvider:(id)settingsProvider {
#pragma mark Generation handling
-- (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
+- (BOOL)generateOutputWithStore:(id)aStore error:(NSError **)error {
GBLogVerbose(@"%@ is generating output...", [self className]);
- self.store = store;
+ self.store = aStore;
return YES;
}
View
8 Model/GBModelBase.m
@@ -46,12 +46,12 @@ - (void)mergeDataFromObject:(id)source {
}
// Merge comment.
- GBComment *comment = [(GBModelBase *)source comment];
- if (self.comment && comment) {
- GBLogXWarn(self.prefferedSourceInfo, @"%@: Comment found in %@ and %@!", self, self.comment.sourceInfo, comment.sourceInfo);
+ GBComment *theComment = [(GBModelBase *)source comment];
+ if (self.comment && theComment) {
+ GBLogXWarn(self.prefferedSourceInfo, @"%@: Comment found in %@ and %@!", self, self.comment.sourceInfo, theComment.sourceInfo);
@hlfcoding
hlfcoding added a line comment Apr 9, 2013

Is there any way to have a command-line option for disabling this warning? I get this everywhere, and I'm not sure what's needed to make sure there's no 'redundant' comments. Thanks in advance!

@tomaz
Owner
tomaz added a line comment Apr 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
return;
}
- if (!self.comment && comment) self.comment = comment;
+ if (!self.comment && theComment) self.comment = theComment;
}
#pragma mark Source information handling
View
6 Parsing/GBObjectiveCParser.m
@@ -87,13 +87,13 @@ - (id)initWithSettingsProvider:(id)settingsProvider {
#pragma mark Parsing handling
-- (void)parseObjectsFromString:(NSString *)input sourceFile:(NSString *)filename toStore:(id)store {
+- (void)parseObjectsFromString:(NSString *)input sourceFile:(NSString *)filename toStore:(id)aStore {
NSParameterAssert(input != nil);
NSParameterAssert(filename != nil);
NSParameterAssert([filename length] > 0);
- NSParameterAssert(store != nil);
+ NSParameterAssert(aStore != nil);
GBLogDebug(@"Parsing objective-c objects...");
- self.store = store;
+ self.store = aStore;
self.tokenizer = [GBTokenizer tokenizerWithSource:[self tokenizerWithInputString:input] filename:filename settings:self.settings];
self.includeInOutput = YES;
self.propertyAfterPragma = NO;
View
18 Parsing/GBParser.m
@@ -53,11 +53,11 @@ - (id)initWithSettingsProvider:(id)settingsProvider {
#pragma mark File system parsing handling
-- (void)parseObjectsFromPaths:(NSArray *)paths toStore:(id)store {
+- (void)parseObjectsFromPaths:(NSArray *)paths toStore:(id)aStore {
NSParameterAssert(paths != nil);
- NSParameterAssert(store != nil);
+ NSParameterAssert(aStore != nil);
GBLogVerbose(@"Parsing objects from %lu paths...", [paths count]);
- self.store = store;
+ self.store = aStore;
self.numberOfParsedFiles = 0;
for (NSString *input in paths) {
[self parsePath:input usingBlock:^(NSString *path) {
@@ -78,11 +78,11 @@ - (void)parseObjectsFromPaths:(NSArray *)paths toStore:(id)store {
GBLogVerbose(@"Parsed %lu source files.", self.numberOfParsedFiles);
}
-- (void)parseDocumentsFromPaths:(NSArray *)paths toStore:(id)store {
+- (void)parseDocumentsFromPaths:(NSArray *)paths toStore:(id)aStore {
NSParameterAssert(paths != nil);
- NSParameterAssert(store != nil);
+ NSParameterAssert(aStore != nil);
GBLogVerbose(@"Parsing static documents from %u paths...", [paths count]);
- self.store = store;
+ self.store = aStore;
self.numberOfParsedDocuments = 0;
for (NSString *input in paths) {
[self parsePath:input usingBlock:^(NSString *path) {
@@ -107,11 +107,11 @@ - (void)parseDocumentsFromPaths:(NSArray *)paths toStore:(id)store {
GBLogVerbose(@"Parsed %lu static document files.", self.numberOfParsedDocuments);
}
-- (void)parseCustomDocumentFromPath:(NSString *)path outputSubpath:(NSString *)subpath key:(id)key toStore:(id)store {
+- (void)parseCustomDocumentFromPath:(NSString *)path outputSubpath:(NSString *)subpath key:(id)key toStore:(id)aStore {
if (!path || [path length] == 0) return;
NSParameterAssert(key != nil);
- NSParameterAssert(store != nil);
- self.store = store;
+ NSParameterAssert(aStore != nil);
+ self.store = aStore;
GBLogInfo(@"Parsing custom document from '%@'...", path);
NSError *error = nil;
View
10 Parsing/GBTokenizer.m
@@ -51,21 +51,21 @@ + (id)tokenizerWithSource:(PKTokenizer *)tokenizer filename:(NSString *)filename
return [[[self alloc] initWithSourceTokenizer:tokenizer filename:filename settings:settings] autorelease];
}
-- (id)initWithSourceTokenizer:(PKTokenizer *)tokenizer filename:(NSString *)filename settings:(id)settings {
+- (id)initWithSourceTokenizer:(PKTokenizer *)tokenizer filename:(NSString *)aFilename settings:(id)theSettings {
NSParameterAssert(tokenizer != nil);
- NSParameterAssert(filename != nil);
- NSParameterAssert([filename length] > 0);
+ NSParameterAssert(aFilename != nil);
+ NSParameterAssert([aFilename length] > 0);
GBLogDebug(@"Initializing tokenizer...");
self = [super init];
if (self) {
- self.settings = settings;
+ self.settings = theSettings;
self.singleLineCommentRegex = @"(?m-s:\\s*///(.*)$)";
self.multiLineCommentRegex = @"(?s:/\\*[*!](.*)\\*/)";
self.commentDelimiterRegex = @"^[!@#$%^&*()_=+`~,<.>/?;:'\"-]{3,}$";
self.tokenIndex = 0;
self.lastCommentBuilder = [NSMutableString string];
self.previousCommentBuilder = [NSMutableString string];
- self.filename = filename;
+ self.filename = aFilename;
self.input = tokenizer.string;
self.tokens = [self allTokensFromTokenizer:tokenizer];
[self consumeComments];
View
6 Processing/GBCommentsProcessor.m
@@ -125,16 +125,16 @@ - (id)initWithSettingsProvider:(id)settingsProvider {
#pragma mark Processing handling
-- (void)processComment:(GBComment *)comment withContext:(id)context store:(id)store {
+- (void)processComment:(GBComment *)comment withContext:(id)context store:(id)aStore {
NSParameterAssert(comment != nil);
- NSParameterAssert(store != nil);
+ NSParameterAssert(aStore != nil);
if (comment.originalContext != nil && comment.originalContext != context) return;
if (comment.isProcessed) return;
GBLogDebug(@"Processing %@ found in %@...", comment, comment.sourceInfo.filename);
self.reservedShortDescriptionData = nil;
self.currentComment = comment;
self.currentContext = context;
- self.store = store;
+ self.store = aStore;
NSArray *lines = [comment.stringValue arrayOfLines];
NSUInteger line = comment.sourceInfo.lineNumber;
NSRange blockRange = NSMakeRange(0, 0);
View
6 Processing/GBProcessor.m
@@ -66,11 +66,11 @@ - (id)initWithSettingsProvider:(id)settingsProvider {
#pragma mark Processing handling
-- (void)processObjectsFromStore:(id)store {
- NSParameterAssert(store != nil);
+- (void)processObjectsFromStore:(id)aStore {
+ NSParameterAssert(aStore != nil);
GBLogVerbose(@"Processing parsed objects...");
self.currentContext = nil;
- self.store = store;
+ self.store = aStore;
[self setupKnownObjectsFromStore];
[self mergeKnownCategoriesFromStore];
[self processClasses];
View
2 appledoc.xcodeproj/project.pbxproj
@@ -1101,7 +1101,7 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0420;
+ LastUpgradeCheck = 0430;
ORGANIZATIONNAME = "Gentle Bytes";
};
buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "appledoc" */;

0 comments on commit a136f4d

Please sign in to comment.