After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720082 - fix up non-literal format string issues
fix up non-literal format string issues
Product: libsoup
Classification: Core
Component: Misc
Other All
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
Depends on:
Reported: 2013-12-08 20:43 UTC by Allison Karlitskaya (desrt)
Modified: 2013-12-09 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---

fix up non-literal format string issues (2.34 KB, patch)
2013-12-08 20:43 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2013-12-08 20:43:06 UTC
See patch.
Comment 1 Allison Karlitskaya (desrt) 2013-12-08 20:43:07 UTC
Created attachment 263774 [details] [review]
fix up non-literal format string issues

Fix up a couple of errors picked up by -Werror=format-nonliteral on
Comment 2 Dan Winship 2013-12-09 14:27:31 UTC
Comment on attachment 263774 [details] [review]
fix up non-literal format string issues

>-static char *
>+G_GNUC_PRINTF (2, 0) static char *

There was some bug earlier where it turned out that some version of clang didn't like having attributes attached to function definitions; they could only be attached to function prototypes. So, it would be better to split out a prototype for the function first, with the annotation, and then leave the actual definition as it was.

ok to commit with that change
Comment 3 Allison Karlitskaya (desrt) 2013-12-09 14:45:38 UTC
I (thought I?) hit an issue when i put the G_GNUC_PRINTF at the end... so that's why I put it at the start like this, which seemed to make it work.

Applying a similar change to another project, though, I found that it worked at the end again...

Do you have a reference to the problem that was reported before?
Comment 4 Dan Winship 2013-12-09 14:49:01 UTC
bug 708793 comment 2
Comment 5 Allison Karlitskaya (desrt) 2013-12-09 16:29:29 UTC
Attachment 263774 [details] pushed as c2c2ecb - fix up non-literal format string issues