Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new Xcode 4.6 warnings #33

Merged
merged 2 commits into from Sep 19, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/CDClassDump.m
Expand Up @@ -79,7 +79,7 @@ - (id)init;
- (BOOL)shouldShowName:(NSString *)name;
{
if (self.regularExpression != nil) {
NSTextCheckingResult *firstMatch = [self.regularExpression firstMatchInString:name options:0 range:NSMakeRange(0, [name length])];
NSTextCheckingResult *firstMatch = [self.regularExpression firstMatchInString:name options:(NSMatchingOptions)0 range:NSMakeRange(0, [name length])];
return firstMatch != nil;
}

Expand Down Expand Up @@ -114,7 +114,7 @@ - (BOOL)hasObjectiveCRuntimeInfo;
return self.containsObjectiveCData || self.hasEncryptedFiles;
}

- (BOOL)loadFile:(CDFile *)file error:(NSError **)error;
- (BOOL)loadFile:(CDFile *)file error:(NSError *__autoreleasing *)error;
{
//NSLog(@"targetArch: (%08x, %08x)", targetArch.cputype, targetArch.cpusubtype);
CDMachOFile *machOFile = [file machOFileWithArch:_targetArch];
Expand Down
6 changes: 3 additions & 3 deletions Source/CDTypeParser.m
Expand Up @@ -45,7 +45,7 @@ - (id)initWithString:(NSString *)string;
if ((self = [super init])) {
// Do some preprocessing first: Replace "<unnamed>::" with just "unnamed::".
NSMutableString *str = [string mutableCopy];
[str replaceOccurrencesOfString:@"<unnamed>::" withString:@"unnamed::" options:0 range:NSMakeRange(0, [string length])];
[str replaceOccurrencesOfString:@"<unnamed>::" withString:@"unnamed::" options:(NSStringCompareOptions)0 range:NSMakeRange(0, [string length])];

_lexer = [[CDTypeLexer alloc] initWithString:str];
_lookahead = 0;
Expand All @@ -56,7 +56,7 @@ - (id)initWithString:(NSString *)string;

#pragma mark -

- (NSArray *)parseMethodType:(NSError **)error;
- (NSArray *)parseMethodType:(NSError *__autoreleasing *)error;
{
NSArray *result;

Expand Down Expand Up @@ -92,7 +92,7 @@ - (NSArray *)parseMethodType:(NSError **)error;
return result;
}

- (CDType *)parseType:(NSError **)error;
- (CDType *)parseType:(NSError *__autoreleasing *)error;
{
CDType *result;

Expand Down
6 changes: 3 additions & 3 deletions Source/NSScanner-CDExtensions.m
Expand Up @@ -88,7 +88,7 @@ - (BOOL)scanCharacter:(unichar *)value;
return YES;
}

- (BOOL)scanCharacterFromSet:(NSCharacterSet *)set intoString:(NSString **)value;
- (BOOL)scanCharacterFromSet:(NSCharacterSet *)set intoString:(NSString *__autoreleasing *)value;
{
//[self skipCharacters];

Expand All @@ -113,7 +113,7 @@ - (BOOL)scanCharacterFromSet:(NSCharacterSet *)set intoString:(NSString **)value

// This works for my purposes, but I haven't tested it to make sure it's fully compatible with the standard version.

- (BOOL)my_scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString **)value;
- (BOOL)my_scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString *__autoreleasing *)value;
{
NSUInteger currentLocation = [self scanLocation];

Expand Down Expand Up @@ -151,7 +151,7 @@ - (BOOL)my_scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString **)v
return YES;
}

- (BOOL)scanIdentifierIntoString:(NSString **)stringPointer;
- (BOOL)scanIdentifierIntoString:(NSString *__autoreleasing *)stringPointer;
{
NSString *start, *remainder;

Expand Down
2 changes: 1 addition & 1 deletion class-dump.m
Expand Up @@ -170,7 +170,7 @@ int main(int argc, char *argv[])
case 'C': {
NSError *error;
NSRegularExpression *regularExpression = [NSRegularExpression regularExpressionWithPattern:[NSString stringWithUTF8String:optarg]
options:0
options:(NSRegularExpressionOptions)0
error:&error];
if (regularExpression != nil) {
classDump.regularExpression = regularExpression;
Expand Down
40 changes: 21 additions & 19 deletions class-dump.xcodeproj/project.pbxproj
Expand Up @@ -948,7 +948,7 @@
01EB825613A590D9003EDE60 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0450;
LastUpgradeCheck = 0460;
};
buildConfigurationList = 01EB825913A590D9003EDE60 /* Build configuration list for PBXProject "class-dump" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -1193,15 +1193,9 @@
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = (
"-fdiagnostics-show-option",
"-Weverything",
"-Wno-semicolon-before-method-body",
"-Wno-c11-extensions",
"-Wno-readonly-setter-attrs",
"-Wno-overriding-method-mismatch",
"-Wno-unused-macros",
"-Wno-objc-missing-property-synthesis",
"-Wno-pedantic",
"$(inherited)",
"-Wno-objc-interface-ivars",
"-Wno-gnu",
);
WRAPPER_EXTENSION = octest;
};
Expand All @@ -1224,15 +1218,9 @@
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = (
"-fdiagnostics-show-option",
"-Weverything",
"-Wno-semicolon-before-method-body",
"-Wno-c11-extensions",
"-Wno-readonly-setter-attrs",
"-Wno-overriding-method-mismatch",
"-Wno-unused-macros",
"-Wno-objc-missing-property-synthesis",
"-Wno-pedantic",
"$(inherited)",
"-Wno-objc-interface-ivars",
"-Wno-gnu",
);
WRAPPER_EXTENSION = octest;
};
Expand Down Expand Up @@ -1337,7 +1325,11 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
Expand All @@ -1352,6 +1344,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = /;
MACOSX_DEPLOYMENT_TARGET = 10.7;
Expand All @@ -1366,6 +1359,8 @@
"-Wno-overriding-method-mismatch",
"-Wno-unused-macros",
"-Wno-objc-missing-property-synthesis",
"-Wno-direct-ivar-access",
"-Wno-arc-repeated-use-of-weak",
);
};
name = Debug;
Expand All @@ -1375,7 +1370,11 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -1384,6 +1383,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = /;
MACOSX_DEPLOYMENT_TARGET = 10.7;
Expand All @@ -1397,6 +1397,8 @@
"-Wno-overriding-method-mismatch",
"-Wno-unused-macros",
"-Wno-objc-missing-property-synthesis",
"-Wno-direct-ivar-access",
"-Wno-arc-repeated-use-of-weak",
);
};
name = Release;
Expand Down