Given tmp.cpp:
#include <stdio.h>
#pragma report(disable, CCN8826)
int main(int argc, const char *argv[])
{
const char * hi = "hi\n";
printf(hi);
return 0;
}
Despite I use #pragma report
that is supposed to suppress the warning, I still get:
bash-3.1$ xlC -qformat=all tmp.cpp
"tmp.cpp", line 8.12: 1540-2826 (W) The format string is not a string literal
and format arguments are not given.
How do I get rid of that warning?
The error message numbers are here and the #pragma report description is here. My compiler is IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0