GNOME Bugzilla – Bug 764153
Fails to build in GCC 6
Last modified: 2016-04-15 10:23:34 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.
Created attachment 324943 [details] [review] FIx compilation error Attached patch fixes the problem for me. It uses g_strconcat() instead of formatted print.
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.
(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?
(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 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.