PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 28, 2022

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

 April 28, 2022     implicit-conversion, precision, swift5, warnings, xcode11     No comments   

Issue

Since Xcode 11.2, I have this warning: Implicit conversion loses integer precision: 'const GULLoggerLevel' (aka 'const enum GULLoggerLevel') to 'int'.

This warning refers me to this line:

dispatch_async(sGULClientQueue, ^{
    asl_log(sGULLoggerClient, NULL, level, "%s", logMsg.UTF8String);
  })

This line is part of this block:

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

Can anybody help me with this warning ?


Solution

you just have to replace"level" by "(int)level"



Answered By - Sukhoi
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing