build fails with very recent gcc 4.6: unused-but-set-variable error

Bug #706703 reported by Adam Williamson on 2011-01-23
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
BAMF
Wishlist
Unassigned
Unity
Invalid
Wishlist
Unassigned
unity-2d
Undecided
Unassigned
bamf (Ubuntu)
Wishlist
Unassigned

Bug Description

After Fedora went to a snapshot of GCC 4.6 trunk from Jan 22nd, build of bamf stopped working. It hits an unused-but-set-variable error in lib/libbamf/bamf-view.c 's bamf_view_set_property function, which is treated as an error by the use of strict compiler options in bamf's build.

bamf-view.c: In function 'bamf_view_set_property':
bamf-view.c:543:13: error: variable 'self' set but not used [-Werror=unused-but
-set-variable]
cc1: all warnings being treated as errors

Alex Launi (alexlauni) on 2011-02-23
Changed in bamf:
status: New → Confirmed
Changed in bamf (Ubuntu):
status: New → Confirmed
Changed in bamf:
importance: Undecided → Wishlist
Changed in unity:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in bamf (Ubuntu):
importance: Undecided → Wishlist
Adam Dingle (adam-yorba) wrote :

Here's a patch that fixes the build errors, assuming that you want to stay with GNOME_COMPILE_WARNINGS(maximum) and fix all these errors in place.

tags: added: patch
Didier Roche (didrocks) wrote :

Hey Adam, thanks for your patch :)

The patch looks good, I'll just ask for Jason for a second look, I think we can remove other parts like:
- matcher = bamf_matcher_get_default ();
- control = bamf_control_get_default ();
- source = g_object_new (BAMF_TYPE_TAB_SOURCE, "id", "testingsource", NULL);
+ bamf_matcher_get_default ();
+ bamf_control_get_default ();
+ g_object_new (BAMF_TYPE_TAB_SOURCE, "id", "testingsource", NULL);

-> if we don't reference them, there is no need at all for those calls or objects ;)

Jason?

Changed in bamf:
assignee: nobody → Jason Smith (jassmith)
Didier Roche (didrocks) on 2011-05-31
Changed in unity-2d:
status: New → Confirmed
Changed in unity-2d:
status: Confirmed → Invalid
Didier Roche (didrocks) on 2011-10-03
Changed in unity-2d:
status: Invalid → Confirmed
Changed in unity-2d:
status: Confirmed → Invalid
Omer Akram (om26er) on 2012-08-19
Changed in unity:
status: Confirmed → Invalid
Changed in bamf:
assignee: Jason Smith (jassmith) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Patches