When I compile this code from the command line:
printf("%d", "hello world");
I get the obvious warning: warning: format '%d' expects type 'int', but argument 2 has type 'char *'
But when I compile the same code from inside geany, I see this: warning: format '-1074321152' expects type 'int', but argument 2 has type 'char *'
The problem is that the msgwin_compiler_add() function expects a format string, and when it sees the '%d' it looks in the va_list for an argument that isn't there.
This patch changes the msgwin_compiler_add() to take a single string as its argument, and adds a wrapper function named msgwin_compiler_add_fmt() that uses the va_list.
- Jeff