I have the compiler error:
libvncserver/main.c:245: error: format not a string literal and no format arguments
And line 245 is:
fprintf(stderr,buf);
where buf is “char buf[256];”
I don’t see what is wrong with line 245 and how can I fix it?
When I comment out that line, the program compiles.
What is wrong is that any
printffunction expects aconst char *while you are providing just achar *. Since the buffer can contain whatever you want the compiler is not sure that it will contain a correct format string. Just doso that it will be sure that you are not going to pass something strange.