https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28492

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org
            Summary|-Wmissing-format-attribute  |-Wmissing-format-attribute
                   |causes warning for          |points to vsnprintf() or
                   |vsnprintf()                 |related functions instead
                   |                            |of the function that needs
                   |                            |the attribute added

--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #3)
> OK, I see that the warning is misleading, because it points to the call of
> vsnprintf instead of pointing to vsnprintf_one.
> 
> ttest.c: In function ‘vsnprintf_one’:
> ttest.c:826:5: warning: function might be possible candidate for
> ‘gnu_printf’ format attribute [-Wmissing-format-attribute]
>      vsnprintf(self, 2, "%c", arglist);
>      ^

(In reply to Eric Gallager from comment #4)
> (In reply to Manuel López-Ibáñez from comment #3)
> > OK, I see that the warning is misleading, because it points to the call of
> > vsnprintf instead of pointing to vsnprintf_one.
> > 
> > ttest.c: In function ‘vsnprintf_one’:
> > ttest.c:826:5: warning: function might be possible candidate for
> > ‘gnu_printf’ format attribute [-Wmissing-format-attribute]
> >      vsnprintf(self, 2, "%c", arglist);
> >      ^
> 
> Same thing with the other members of the vprintf family of functions, such
> as vfprintf... I remember getting particularly confused by this one in the
> past and hacking together some really ugly workarounds to deal with it, when
> all I really needed to do was to put the format attribute on the calling
> function, instead of trying to re-declare vfprintf...

Retitling to clarify

Reply via email to