开发者

XCode warning: argument 3 discards qualifiers from pointer target type

XCode is giving me a warning that I can't figure out why.

@interface SFHFKeychainUtils : NSObject {

}

+ (BOOL) storeUsername: (NSString *) username andPassword: (NSString *) password forServiceName: (NSString *) serviceName updateExisting: (BOOL) updateExisting error: (NSError **) error;
@end

In another class I call storeUsername:andPassword:forServiceName:updateExisting:error:, see:

- (void)armazenar开发者_Python百科Login:(NSString *)login withPassword:(NSString *)password {
    if (login != nil && password != nil) {
        NSError *error = nil;
        [SFHFKeychainUtils storeUsername:login andPassword:password forServiceName:kKeychainServiceName updateExisting:YES error:&error]; // warning here
    }
}

This is the warning:

Passing argument 3 of 'storeUsername:andPassword:forServiceName:updateExisting:error:' discards qualifiers from pointer target

But I'm passing a pointer to NSError. How do I solve this warning?


Argument 3 is serviceName, isn't it? Check its declaraion. I bet it's const.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜