我们如何解决丢失精度的转换问题? (Xcode 11.2)

How can we solve conversion problem that loses precision ? (Xcode 11.2)

自 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);
  });

任何人都可以帮我解决这个警告吗?

您只需将"level"替换为“(int)level”