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 666240 - Fix gcc warnings in gvc-level-bar.c
Fix gcc warnings in gvc-level-bar.c
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Sound
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-15 11:14 UTC by Guillaume Desmottes
Modified: 2012-01-09 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gvc-level-bar: define priv->scale as a GvcLevelScale (963 bytes, patch)
2011-12-15 11:18 UTC, Guillaume Desmottes
committed Details | Review
gvc-level-bar: fix shadow global declaration warnings (5.40 KB, patch)
2011-12-15 11:18 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-12-15 11:14:33 UTC
I'm trying to use gvc-level-bar.c in Empathy (cf bug #656580) but hit those warnings when building it:

gvc-level-bar.c: In function 'gvc_level_bar_set_scale':
gvc-level-bar.c:365:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
gvc-level-bar.c: In function 'curved_rectangle':
gvc-level-bar.c:523:26: error: declaration of 'y0' shadows a global declaration [-Werror=shadow]
gvc-level-bar.c:529:16: error: declaration of 'y1' shadows a global declaration [-Werror=shadow]


As we always build master with fatal warnings I fixed them.
Comment 1 Guillaume Desmottes 2011-12-15 11:18:05 UTC
Created attachment 203558 [details] [review]
gvc-level-bar: define priv->scale as a GvcLevelScale

That's cleaner and fix a sign-compare warning in gcc.
Comment 2 Guillaume Desmottes 2011-12-15 11:18:07 UTC
Created attachment 203559 [details] [review]
gvc-level-bar: fix shadow global declaration warnings

Those variables are already defined in some headers (like bits/math-finite.h)
making gcc unhappy.
Comment 3 Bastien Nocera 2012-01-09 10:58:13 UTC
Attachment 203558 [details] pushed as 5568917 - gvc-level-bar: define priv->scale as a GvcLevelScale
Attachment 203559 [details] pushed as d0db3c9 - gvc-level-bar: fix shadow global declaration warnings