Skip to content

Commit

Permalink
fixed warnings when build for 32/64 bit universal binary
Browse files Browse the repository at this point in the history
suppress this error: Values of type 'OSStatus' should not be used as format arguments; add an
explicit cast to 'int' instead
  • Loading branch information
Makoto Hamanaka committed Oct 15, 2014
1 parent 4af56b0 commit b165ce0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions LKKeychain.m
Expand Up @@ -52,7 +52,7 @@ + (NSString*)getPasswordWithAccount:(NSString*)account service:(NSString*)servic
// do nothing
[passwordData release];
} else {
NSLog(@"%s|SecItemCopyMatching: error(%ld)", __PRETTY_FUNCTION__, err);
NSLog(@"%s|SecItemCopyMatching: error(%d)", __PRETTY_FUNCTION__, (int)err);
}

return password;
Expand Down Expand Up @@ -81,7 +81,7 @@ + (BOOL)updatePassword:(NSString*)password account:(NSString*)account service:(N
if (err == noErr) {
result = YES;
} else {
NSLog(@"%s|SecItemUpdate: error(%ld)", __PRETTY_FUNCTION__, err);
NSLog(@"%s|SecItemUpdate: error(%d)", __PRETTY_FUNCTION__, (int)err);
}

} else if (err == errSecItemNotFound) {
Expand All @@ -98,11 +98,11 @@ + (BOOL)updatePassword:(NSString*)password account:(NSString*)account service:(N
if (err == noErr) {
result = YES;
} else {
NSLog(@"%s|SecItemAdd: error(%ld)", __PRETTY_FUNCTION__, err);
NSLog(@"%s|SecItemAdd: error(%d)", __PRETTY_FUNCTION__, (int)err);
}

} else {
NSLog(@"%s|SecItemCopyMatching: error(%ld)", __PRETTY_FUNCTION__, err);
NSLog(@"%s|SecItemCopyMatching: error(%d)", __PRETTY_FUNCTION__, (int)err);
}

return result;
Expand All @@ -121,7 +121,7 @@ + (BOOL)deletePasswordWithAccount:(NSString*)account service:(NSString*)service
if (err == noErr) {
result = YES;
} else {
NSLog(@"%s|SecItemDelete: error(%ld)", __PRETTY_FUNCTION__, err);
NSLog(@"%s|SecItemDelete: error(%d)", __PRETTY_FUNCTION__, (int)err);
}

return result;
Expand All @@ -147,7 +147,7 @@ + (NSArray*)getItemsWithService:(NSString*)service
if (err == noErr) {
return [(NSArray*)result autorelease];
} else {
NSLog(@"%s|SecItemCopyMatching: error(%ld)", __PRETTY_FUNCTION__, err);
NSLog(@"%s|SecItemCopyMatching: error(%d)", __PRETTY_FUNCTION__, (int)err);
return nil;
}
}
Expand Down

0 comments on commit b165ce0

Please sign in to comment.