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 764153 - Fails to build in GCC 6
Fails to build in GCC 6
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
git master
Other Linux
: Normal blocker
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-24 15:51 UTC by Bastien Nocera
Modified: 2016-04-15 10:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
FIx compilation error (3.24 KB, patch)
2016-03-29 14:57 UTC, Marek Kašík
committed Details | Review

Description Bastien Nocera 2016-03-24 15:51:06 UTC
c-printers-panel.c: In function ‘test_page_cb’:
cc-printers-panel.c:2566:15: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
               filename = g_strdup_printf (*pattern, datadir);
               ^~~~~~~~
cc-printers-panel.c:2582:19: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
                   filename = g_strdup_printf (*pattern, datadir);
                   ^~~~~~~~

See https://mail.gnome.org/archives/desktop-devel-list/2016-March/msg00075.html for details.
Comment 1 Marek Kašík 2016-03-29 14:57:26 UTC
Created attachment 324943 [details] [review]
FIx compilation error

Attached patch fixes the problem for me. It uses g_strconcat() instead of formatted print.
Comment 2 Bastien Nocera 2016-04-15 09:46:48 UTC
Review of attachment 324943 [details] [review]:

Looks fine otherwise, for gnome-3-20 and master.

::: panels/printers/cc-printers-panel.c
@@ +2532,3 @@
+      if (g_access (filename, R_OK) == 0)
+        break;
+      else

No need for else, you're already exiting the loop.
Comment 3 Marek Kašík 2016-04-15 09:56:38 UTC
(In reply to Bastien Nocera from comment #2)
> Review of attachment 324943 [details] [review] [review]:
> 
> Looks fine otherwise, for gnome-3-20 and master.

I see that you've already fixed this in master and 3.20. Do you want to get the changes I made in there?
Comment 4 Bastien Nocera 2016-04-15 10:02:53 UTC
(In reply to Marek Kašík from comment #3)
> (In reply to Bastien Nocera from comment #2)
> > Review of attachment 324943 [details] [review] [review] [review]:
> > 
> > Looks fine otherwise, for gnome-3-20 and master.
> 
> I see that you've already fixed this in master and 3.20. Do you want to get
> the changes I made in there?

Your version is slightly cleaner, so yes. As it works though, would only be for master.
Comment 5 Marek Kašík 2016-04-15 10:23:21 UTC
Comment on attachment 324943 [details] [review]
FIx compilation error

(In reply to Bastien Nocera from comment #4)
> (In reply to Marek Kašík from comment #3)
> > (In reply to Bastien Nocera from comment #2)
> > > Review of attachment 324943 [details] [review] [review] [review] [review]:
> > > 
> > > Looks fine otherwise, for gnome-3-20 and master.
> > 
> > I see that you've already fixed this in master and 3.20. Do you want to get
> > the changes I made in there?
> 
> Your version is slightly cleaner, so yes. As it works though, would only be
> for master.

I've pushed it to master.