从Xcode11.2开始,我得到了这样的警告:Implicit conversion loses integer precision: 'const GULLoggerLevel' (aka 'const enum GULLoggerLevel') to 'int'。
此警告将我引向此行:
dispatch_async(sGULClientQueue, ^{
asl_log(sGULLoggerClient, NULL, level, "%s", logMsg.UTF8String);
})这一行是这个块的一部分:
NSString *logMsg = [[NSString alloc] initWithFormat:message arguments:args_ptr];
logMsg = [NSString stringWithFormat:@"%s - %@[%@] %@", sVersion, service, messageCode, logMsg];
dispatch_async(sGULClientQueue, ^{
asl_log(sGULLoggerClient, NULL, level, "%s", logMsg.UTF8String);
});有人能帮我解决这个警告吗?
发布于 2019-11-02 21:30:57
您只需将“level”替换为"(int)level“
https://stackoverflow.com/questions/58670295
复制相似问题