自Xcode 11.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);
});
有人可以帮我这个警告吗?
您只需要用“(int)level”替换“ level”