[Geany] Patch to handle format warnings in gcc output

Enrico Tröger enrico.troeger at xxxxx
Sun Jan 21 18:23:45 UTC 2007


On Sun, 21 Jan 2007 08:32:44 -0600, "Jeff Pohlmeyer"
<yetanothergeek at gmail.com> wrote:

> 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.
Thank you. I guess I never got aware of that.
Your patch was applied with SVN r1217.

Regards,
Enrico

--
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20070121/0c1483cb/attachment.pgp>


More information about the Users mailing list