您的位置:首页 > 其它

Implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in C99

2015-09-26 15:24 645 查看
1. 问题

FMDatabaseAdditions.m:137:19: Implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in C99

2. 办法

加上 红色的code....

#if TARGET_OS_MAC && !TARGET_OS_IPHONE
- (NSString*)applicationIDString {
NSString *s = NSFileTypeForHFSTypeCode([self applicationID]);

assert([s length] == 6);

s = [s substringWithRange:NSMakeRange(1, 4)];

return s;

}

- (void)setApplicationIDString:(NSString*)s {

if ([s length] != 4) {
NSLog(@"setApplicationIDString: string passed is not exactly 4 chars long. (was %ld)", [s length]);
}

[self setApplicationID:NSHFSTypeCodeFromFileType([NSString stringWithFormat:@"'%@'", s])];
}

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: