GNOME Bugzilla – Bug 579070
[sunaudio] fix compiler warnings
Last modified: 2009-04-15 18:35:21 UTC
There's some unused variables in gstsunaudiomixerctrl.c and gstsunaudiosink.c that break compilation with -Wall -Werror. There's also these warnings that I'm not sure how to get rid of: gstsunaudiomixerctrl.c: In function `gst_sunaudiomixer_ctrl_get_volume': gstsunaudiomixerctrl.c:179: warning: 'gain' might be used uninitialized in this function gstsunaudiomixerctrl.c:179: warning: 'balance' might be used uninitialized in this function The code in question is: gint gain, balance; [stuff, doesn't touch gain or balance] switch (sunaudiotrack->track_num) { case GST_SUNAUDIO_TRACK_OUTPUT: gain = (int) audioinfo.play.gain; balance = audioinfo.play.balance; break; case GST_SUNAUDIO_TRACK_LINE_IN: gain = (int) audioinfo.record.gain; balance = audioinfo.record.balance; break; case GST_SUNAUDIO_TRACK_MONITOR: gain = (int) audioinfo.monitor_gain; balance = audioinfo.record.balance; break; } so I guess because there's no default case gcc complains.
Created attachment 132714 [details] [review] remove unused variables in sunaudio
Committed, thanks for the patch! commit 4a74e341ecc7369c3c48b653e753a28b6c20eb64 Author: James Andrewartha <trs80@ucc.gu.uwa.edu.au> Date: Wed Apr 15 19:28:53 2009 +0100 sunaudio: remove some unused variables and goto labels Fixes #579070.