C++: Add cpp/non-constant-format test

This commit is contained in:
Jeroen Ketema
2023-08-22 16:23:47 +02:00
parent afe1e9c453
commit 1e8daff02a

View File

@@ -156,3 +156,10 @@ void fmt_via_strcpy(char *data) {
strcpy(data, "some string"); strcpy(data, "some string");
printf(data); // BAD printf(data); // BAD
} }
void fmt_with_assignment() {
const char *x, *y;
x = y = "a";
printf(y);
}