Format specifier inspection seems wrong

Just wondering, why does ReSharper not like this format specifier?

    unsigned value = 0xff;
    printf("%#010X", value);

The inspection says "Sign and justification field '#0' is redundant".

Output is "0X000000FF", as expected.

Using VS2017 and ReSharper C++ 2018.2.3

 

 

1 comment
Comment actions Permalink

Hello,

It does seem like a bug, thanks for reporting this. I've created https://youtrack.jetbrains.com/issue/RSCPP-23678.

0

Please sign in to leave a comment.