I suggest you ...

Relax warning 747 for literals

Given this code:

#include <stdio.h>
#include <string>

void test()
{
std::string mystr("Hello World");
char c;

c = mystr[1];
printf("char: %c", (int)c);
}

Lint produces this output:

c = mystr[1];
main.cc 9 Info 747: Significant prototype coercion (arg. no. 1) int to
unsigned log

It seems unreasonable for this message to be emitted for a literal. The compiler obviously will convert to the properly sized argument.

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    KurtKurt shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base