GNOME Bugzilla – Bug 770555
Tagged entry GResources fixes
Last modified: 2016-09-05 11:29:32 UTC
Those should help fix problems with the resource not being available.
Created attachment 334368 [details] [review] tagged-entry: Fix missing GResource in test application gcc seems to be stripping away the "unused" gd_tagged_entry_get_resource() when linking it. Call the function to avoid the function being stripped away. See https://bugzilla.gnome.org/show_bug.cgi?id=770121
Created attachment 334369 [details] [review] build: Force creation of the resource .h file Otherwise automake will skip it as it is not included anywhere. See https://bugzilla.gnome.org/show_bug.cgi?id=770121
Review of attachment 334368 [details] [review]: ::: test-tagged-entry.c @@ +59,3 @@ GtkWidget *window, *box, *entry, *toggle_visible_button, *toggle_tag_button; GdTaggedEntryTag *tag; + GResource *junk __attribute__ ((unused));; Can you use G_GNUC_UNUSED instead?
Review of attachment 334369 [details] [review]: Sure
Created attachment 334421 [details] [review] tagged-entry: Fix missing GResource when using static library gcc seems to be stripping away the "unused" gd_tagged_entry_get_resource() when linking it. Call the function to avoid the function being stripped away. See https://bugzilla.gnome.org/show_bug.cgi?id=770121
With the above patch, we don't need to modify applications, so that would be the preferred fix. I also made the change mentioned in comment 3.
(In reply to Bastien Nocera from comment #2) > Created attachment 334369 [details] [review] [review] > build: Force creation of the resource .h file > > Otherwise automake will skip it as it is not included anywhere. Wow.......
Review of attachment 334421 [details] [review]: ::: libgd/gd-tagged-entry.c @@ +917,3 @@ { GtkCssProvider *provider; + GResource *junk G_GNUC_UNUSED; If I saw this in code I maintain, I might delete it and discover my mistake later on. You could add a comment or use an obnoxiously-long variable name (e.g. do_not_optimize_away_get_resource) to make it clear.
Created attachment 334425 [details] [review] tagged-entry: Fix missing GResource when using static library gcc seems to be stripping away the "unused" gd_tagged_entry_get_resource() when linking it. Call the function to avoid the function being stripped away. See https://bugzilla.gnome.org/show_bug.cgi?id=770121
Attachment 334369 [details] pushed as 8369805 - build: Force creation of the resource .h file Attachment 334425 [details] pushed as 752f65e - tagged-entry: Fix missing GResource when using static library