Skip to content

Commit

Permalink
fix warnings about format string/types
Browse files Browse the repository at this point in the history
  • Loading branch information
superfell committed Nov 23, 2013
1 parent d360fa4 commit 15a8b66
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions common/credential.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ + (NSArray *)credentialsForServer:(NSString *)protocolAndServer {
[results addObject:[Credential forServer:protocolAndServer username:un keychainItem:itemRef]];
SecKeychainItemFreeContent(&al, NULL);
} else {
NSLog(@"SecKeychainItemCopyAttributesAndData error %ld", s2);
NSLog(@"SecKeychainItemCopyAttributesAndData error %ld", (long)s2);
// no need to release itemRef in the normal caseas the Credential object will own it
CFRelease(itemRef);
}
status = SecKeychainSearchCopyNext(searchRef, &itemRef);
}
CFRelease(searchRef);
} else {
NSLog(@"SecKeychainSearchCreateFromAttributes returned error %ld", status);
NSLog(@"SecKeychainSearchCreateFromAttributes returned error %ld", (long)status);
}
return results;
}
Expand Down Expand Up @@ -96,7 +96,7 @@ + (id)createCredentialForServer:(NSString *)protocolAndServer username:(NSString
[pwd UTF8String],
&itemRef);
if (status != noErr) {
NSLog(@"SecKeychainAddInternetPassword returned error %ld", status);
NSLog(@"SecKeychainAddInternetPassword returned error %ld", (long)status);
return nil;
}
return [Credential forServer:protocolAndServer username:un keychainItem:itemRef];
Expand Down Expand Up @@ -170,7 +170,7 @@ BOOL checkAccessToAcl(SecACLRef acl, NSData *thisAppHash) {
}
CFRelease(desc);
} else {
NSLog(@"SecACLCopySimpleContents failed with error %ld", err);
NSLog(@"SecACLCopySimpleContents failed with error %ld", (long)err);
}
return res;
}
Expand All @@ -179,7 +179,7 @@ - (BOOL)canReadPasswordWithoutPrompt {
SecTrustedApplicationRef app;
OSStatus err = SecTrustedApplicationCreateFromPath(NULL, &app);
if (noErr != err) {
NSLog(@"SecTrustedApplicationCreateFromPath failed with error %ld", err);
NSLog(@"SecTrustedApplicationCreateFromPath failed with error %ld", (long)err);
return NO;
}
NSData *thisAppHash;
Expand All @@ -200,15 +200,15 @@ - (BOOL)canReadPasswordWithoutPrompt {
}
CFRelease(acls);
} else {
NSLog(@"SecAccessCopySelectedACLList failed with error %ld", err);
NSLog(@"SecAccessCopySelectedACLList failed with error %ld", (long)err);
}
CFRelease(access);
} else {
NSLog(@"SecKeychainItemCopyAccess failed with error %ld", err);
NSLog(@"SecKeychainItemCopyAccess failed with error %ld", (long)err);
}
CFRelease(thisAppHash);
} else {
NSLog(@"SecTrustedApplicationCopyData failed with error %ld", err);
NSLog(@"SecTrustedApplicationCopyData failed with error %ld", (long)err);
}
CFRelease(app);
return res;
Expand All @@ -225,7 +225,7 @@ - (OSStatus)setKeychainAttribute:(SecItemAttr)attribute newValue:(NSString *)val
(UInt32)[password lengthOfBytesUsingEncoding:NSUTF8StringEncoding],
[password UTF8String] );
if (status != noErr)
NSLog(@"SecKeychainItemModifyAttributesAndData returned %ld", status);
NSLog(@"SecKeychainItemModifyAttributesAndData returned %ld", (long)status);
return status;
}

Expand Down

0 comments on commit 15a8b66

Please sign in to comment.