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 579070 - [sunaudio] fix compiler warnings
[sunaudio] fix compiler warnings
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other opensolaris
: Normal normal
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-15 16:43 UTC by James Andrewartha
Modified: 2009-04-15 18:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
remove unused variables in sunaudio (1.34 KB, patch)
2009-04-15 16:45 UTC, James Andrewartha
committed Details | Review

Description James Andrewartha 2009-04-15 16:43:41 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.
Comment 1 James Andrewartha 2009-04-15 16:45:08 UTC
Created attachment 132714 [details] [review]
remove unused variables in sunaudio
Comment 2 Tim-Philipp Müller 2009-04-15 18:35:21 UTC
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.