开发者

Getting a compiler warning for creating CFArrayRef

I have the following code for some Address Book search:

ABAddressBookRef ab = ABAddressBookCreate();
NSString *matchStr = [NSString stringWithFormat:@"%@ %@", firstName, lastName];
CFStringRef namestr = (CFStringRef)matchStr;
CFArrayRef matched = ABAddressBookCopyPeopleWithName(ab, namestr);

The last line gives me the warning: Initialization from incompatible pointer type.

Any ideas why开发者_如何学Go?


This code compiles fine for me, as it seems to do for Steven. You probably have a warning on code close to that part, which you mistakenly attributed to this last line.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜