Permalink
Browse files

Fixed compiler warnings from newer Clang

  • Loading branch information...
1 parent a17e8fd commit 54ec21e2e5b40408c46d85eb9d9594ca2933fe91 @snej snej committed Jul 1, 2012
@@ -62,9 +62,9 @@ - (NSString*) databaseName {
- (NSString*) changesFeedPath {
static NSString* const kModeNames[3] = {@"normal", @"longpoll", @"continuous"};
- return [NSString stringWithFormat: @"_changes?feed=%@&heartbeat=300000&since=%u",
+ return [NSString stringWithFormat: @"_changes?feed=%@&heartbeat=300000&since=%lu",
kModeNames[_mode],
- _lastSequenceNumber];
+ (unsigned long)_lastSequenceNumber];
}
- (NSURL*) changesFeedURL {
@@ -125,8 +125,9 @@ - (void) receivedChunk: (NSData*)chunk {
id change = [RESTBody JSONObjectWithString: line];
if (!change)
Warn(@"Received unparseable change line from server: %@", line);
- else if (![self receivedChange: change])
+ else if (![self receivedChange: change]) {
COUCHLOG(@"%@: Couldn't interpret change line %@", self, line);
+ }
}
- (BOOL) receivedPollResponse: (NSData*)body {
View
@@ -316,7 +316,7 @@ - (CouchReplication*) pushToDatabaseAtURL: (NSURL*)targetURL
- (NSArray*) replications {
NSString* myPath = self.relativePath;
- return [self.server.replications rest_map: ^(CouchPersistentReplication* repl) {
+ return [self.server.replications rest_map: ^id(CouchPersistentReplication* repl) {
if ([repl.sourceURLStr isEqualToString: myPath] ||
[repl.targetURLStr isEqualToString: myPath])
return repl;
View
@@ -171,7 +171,7 @@ - (NSArray*) getConflictingRevisions {
NSArray* items = $castIf(NSArray, op.responseBody.fromJSON);
if (!items)
return nil;
- return [items rest_map: ^(id item) {
+ return [items rest_map: ^id(id item) {
NSDictionary* contents = $castIf(NSDictionary, [item objectForKey: @"ok"]);
if (![[contents objectForKey: @"_deleted"] boolValue]) {
NSString* revisionID = $castIf(NSString, [contents objectForKey: @"_rev"]);
@@ -182,7 +182,7 @@ - (NSArray*) getConflictingRevisions {
return revision;
}
}
- return (id)nil;
+ return nil;
}];
}
@@ -849,7 +849,7 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0430;
+ LastUpgradeCheck = 0450;
ORGANIZATIONNAME = "Couchbase, Inc.";
};
buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "CouchCocoa" */;
@@ -1171,6 +1171,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_ARC = YES;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEBUGGING_SYMBOLS = YES;
GCC_DYNAMIC_NO_PIC = NO;
@@ -1195,6 +1196,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_ARC = YES;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -1298,6 +1300,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "";
GCC_DYNAMIC_NO_PIC = NO;
@@ -1315,6 +1318,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "";
@@ -1338,6 +1342,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -1362,6 +1367,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1381,6 +1387,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_DYNAMIC_NO_PIC = NO;
@@ -1400,6 +1407,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
@@ -1465,6 +1473,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "";
GCC_DYNAMIC_NO_PIC = NO;
@@ -1482,6 +1491,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "";
@@ -127,7 +127,7 @@ + (NSSet*) propertyNames {
free(propertiesExcludingSuperclass);
}
[propertyNames unionSet:[[self superclass] propertyNames]];
- [classToNames setObject:propertyNames forKey:self];
+ [classToNames setObject: propertyNames forKey: (id)self];
return propertyNames;
}
@@ -169,8 +169,9 @@ static BOOL getPropertyInfo(Class cls,
const char *name = [propertyName UTF8String];
objc_property_t property = class_getProperty(cls, name);
if (!property) {
- if (![propertyName hasPrefix: @"primitive"]) // Ignore "primitiveXXX" KVC accessors
+ if (![propertyName hasPrefix: @"primitive"]) { // Ignore "primitiveXXX" KVC accessors
COUCHLOG(@"%@ has no dynamic property named '%@' -- failure likely", cls, propertyName);
+ }
*propertyType = NULL;
return NO;
}
View
@@ -119,7 +119,7 @@ - (NSString*) dump {
[output appendFormat: @"\t%@: %@\n", key, [headers objectForKey: key]];
} else if (_error) {
[output appendFormat: @"\n\tError: (%@, %i) %@\n",
- _error.domain, _error.code, _error.localizedDescription];
+ _error.domain, (int)_error.code, _error.localizedDescription];
}
return output;
}

0 comments on commit 54ec21e

Please sign in to comment.