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 783042 - -Wformat warnings triggered by use of gtk_dialog_new_with_buttons
-Wformat warnings triggered by use of gtk_dialog_new_with_buttons
Status: RESOLVED FIXED
Product: gnome-initial-setup
Classification: Applications
Component: general
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Initial Setup maintainer(s)
GNOME Initial Setup maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-05-24 12:15 UTC by Michael Catanzaro
Modified: 2017-05-24 17:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
goa: Fix insufficient function arguments warning (1.08 KB, patch)
2017-05-24 12:32 UTC, Michael Catanzaro
committed Details | Review
privacy: Fix insufficient function arguments warning (1.14 KB, patch)
2017-05-24 12:33 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2017-05-24 12:15:31 UTC
I see a couple -Wformat warnings when compiling gnome-initial-setup:

gis-privacy-page.c: In function 'activate_link':
gis-privacy-page.c:255:41: warning: not enough variable arguments to fit a sentinel [-Wformat=]
                                         NULL);
                                         ^

I think gtk_dialog_new_with_buttons should be called with two trailing NULLs when there are no buttons to add: the first NULL for the button text, and the second NULL to end the va_list. That avoids these warnings.
Comment 1 Michael Catanzaro 2017-05-24 12:32:54 UTC
Created attachment 352489 [details] [review]
goa: Fix insufficient function arguments warning
Comment 2 Michael Catanzaro 2017-05-24 12:33:02 UTC
Created attachment 352490 [details] [review]
privacy: Fix insufficient function arguments warning
Comment 3 Rui Matos 2017-05-24 12:48:42 UTC
Review of attachment 352490 [details] [review]:

looks fine
Comment 4 Rui Matos 2017-05-24 12:49:04 UTC
Review of attachment 352489 [details] [review]:

sure. thanks
Comment 5 Michael Catanzaro 2017-05-24 17:05:24 UTC
Attachment 352489 [details] pushed as 60fd1cd - goa: Fix insufficient function arguments warning
Attachment 352490 [details] pushed as fced05b - privacy: Fix insufficient function arguments warning