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 720208 - owm: rework uri API key logic to use #define
owm: rework uri API key logic to use #define
Product: libgweather
Classification: Core
Component: general
Other All
: Normal normal
: future
Assigned To: libgweather-maint
Depends on:
Reported: 2013-12-10 18:07 UTC by Allison Karlitskaya (desrt)
Modified: 2013-12-10 20:02 UTC
See Also:
GNOME target: ---
GNOME version: ---

owm: rework uri API key logic to use #define (1.83 KB, patch)
2013-12-10 18:07 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2013-12-10 18:07:51 UTC
See patch.
Comment 1 Allison Karlitskaya (desrt) 2013-12-10 18:07:53 UTC
Created attachment 263939 [details] [review]
owm: rework uri API key logic to use #define

Rework the logic for the URI template to use preprocessor defines
instead of a local variable.  This means that we get proper checking of
the format string and avoid the failure to compile under clang when
-Werror=format-nonliteral is used (as it is by default in our CFLAGS
from gnome-common).
Comment 2 Giovanni Campagna 2013-12-10 18:12:54 UTC
Review of attachment 263939 [details] [review]:

Well, clang should really recognize that the format is a string literal in this case (because it does constant propagation after all...), but ok.