Open
Description
The following code:
#include <stdio.h>
#include <stdlib.h>
void parse(char* in) {
const char* B = (char*) malloc(42);
sscanf(in, "%s", B);
}
<source>:7:23: warning: format specifies type 'char *' but the argument has type 'const char *' [-Wformat]
7 | sscanf(pos, "%s", B);
| ~~ ^
| %s
https://godbolt.org/z/Gnqvq4Kvd
produces a -Wformat
warning that has a FixItHint
attached, which does not actually change anything related to the code. Such a warning is a problem in interactive editors where the editor shows "fix available", and after applying the fix, the warning is still there.