Commit 75886ba6 authored by Robert Swain's avatar Robert Swain Committed by Tim-Philipp Müller

oss4: Address unused but set variables

GCC 4.6.x complains about such variable usage. Unused but set variables
were removed except that gst_oss4_mixer_slider_set_mute () now returns
the value from the call to gst_oss4_mixer_set_control_val ().
parent 098cf89e
...@@ -219,7 +219,7 @@ gst_oss4_mixer_slider_set_mute (GstOss4MixerSlider * s, gboolean mute) ...@@ -219,7 +219,7 @@ gst_oss4_mixer_slider_set_mute (GstOss4MixerSlider * s, gboolean mute)
} }
ret = gst_oss4_mixer_set_control_val (s->mixer, s->mc, volume); ret = gst_oss4_mixer_set_control_val (s->mixer, s->mc, volume);
} else { } else {
ret = gst_oss4_mixer_set_control_val (s->mixer, s->mc->mute, !!mute); ret = gst_oss4_mixer_set_control_val (s->mixer, s->mc->mute, ! !mute);
} }
if (mute) { if (mute) {
...@@ -228,7 +228,7 @@ gst_oss4_mixer_slider_set_mute (GstOss4MixerSlider * s, gboolean mute) ...@@ -228,7 +228,7 @@ gst_oss4_mixer_slider_set_mute (GstOss4MixerSlider * s, gboolean mute)
track->flags &= ~GST_MIXER_TRACK_MUTE; track->flags &= ~GST_MIXER_TRACK_MUTE;
} }
return FALSE; return ret;
} }
GstMixerTrack * GstMixerTrack *
...@@ -286,7 +286,7 @@ gst_oss4_mixer_slider_process_change_unlocked (GstMixerTrack * track) ...@@ -286,7 +286,7 @@ gst_oss4_mixer_slider_process_change_unlocked (GstMixerTrack * track)
if (s->mc->mute != NULL && s->mc->mute->changed) { if (s->mc->mute != NULL && s->mc->mute->changed) {
gst_mixer_mute_toggled (GST_MIXER (s->mixer), track, gst_mixer_mute_toggled (GST_MIXER (s->mixer), track,
!!s->mc->mute->last_val); ! !s->mc->mute->last_val);
} else { } else {
/* nothing to do here, since we don't/can't easily implement the record /* nothing to do here, since we don't/can't easily implement the record
* flag */ * flag */
......
...@@ -84,7 +84,6 @@ gboolean ...@@ -84,7 +84,6 @@ gboolean
gst_oss4_mixer_switch_get (GstOss4MixerSwitch * s, gboolean * disabled) gst_oss4_mixer_switch_get (GstOss4MixerSwitch * s, gboolean * disabled)
{ {
GstMixerTrack *track; GstMixerTrack *track;
int flag;
int enabled = -1; int enabled = -1;
track = GST_MIXER_TRACK (s); track = GST_MIXER_TRACK (s);
...@@ -95,8 +94,6 @@ gst_oss4_mixer_switch_get (GstOss4MixerSwitch * s, gboolean * disabled) ...@@ -95,8 +94,6 @@ gst_oss4_mixer_switch_get (GstOss4MixerSwitch * s, gboolean * disabled)
return FALSE; return FALSE;
} }
flag = (enabled == 0) ? GST_MIXER_TRACK_MUTE : 0;
if (enabled) { if (enabled) {
track->flags &= ~GST_MIXER_TRACK_MUTE; track->flags &= ~GST_MIXER_TRACK_MUTE;
} else { } else {
......
...@@ -283,7 +283,6 @@ gst_oss4_property_probe_get_values (GstPropertyProbe * probe, ...@@ -283,7 +283,6 @@ gst_oss4_property_probe_get_values (GstPropertyProbe * probe,
guint prop_id, const GParamSpec * pspec) guint prop_id, const GParamSpec * pspec)
{ {
struct oss_sysinfo si = { {0,}, }; struct oss_sysinfo si = { {0,}, };
GstElementClass *klass;
GValueArray *array = NULL; GValueArray *array = NULL;
GstObject *obj; GstObject *obj;
GList *devices, *l; GList *devices, *l;
...@@ -299,7 +298,6 @@ gst_oss4_property_probe_get_values (GstPropertyProbe * probe, ...@@ -299,7 +298,6 @@ gst_oss4_property_probe_get_values (GstPropertyProbe * probe,
GST_OBJECT_LOCK (obj); GST_OBJECT_LOCK (obj);
/* figure out whether the element is a source or sink */ /* figure out whether the element is a source or sink */
klass = GST_ELEMENT_GET_CLASS (GST_ELEMENT (probe));
if (GST_IS_OSS4_SINK (probe)) { if (GST_IS_OSS4_SINK (probe)) {
GST_DEBUG_OBJECT (probe, "probing available output devices"); GST_DEBUG_OBJECT (probe, "probing available output devices");
cap_mask = PCM_CAP_OUTPUT; cap_mask = PCM_CAP_OUTPUT;
......
...@@ -121,15 +121,11 @@ static void ...@@ -121,15 +121,11 @@ static void
gst_oss4_source_class_init (GstOss4SourceClass * klass) gst_oss4_source_class_init (GstOss4SourceClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSrcClass *gstbasesrc_class; GstBaseSrcClass *gstbasesrc_class;
GstBaseAudioSrcClass *gstbaseaudiosrc_class;
GstAudioSrcClass *gstaudiosrc_class; GstAudioSrcClass *gstaudiosrc_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesrc_class = (GstBaseSrcClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass;
gstbaseaudiosrc_class = (GstBaseAudioSrcClass *) klass;
gstaudiosrc_class = (GstAudioSrcClass *) klass; gstaudiosrc_class = (GstAudioSrcClass *) klass;
gobject_class->dispose = gst_oss4_source_dispose; gobject_class->dispose = gst_oss4_source_dispose;
...@@ -928,16 +924,12 @@ static void ...@@ -928,16 +924,12 @@ static void
gst_oss4_source_mixer_set_mute (GstMixer * mixer, GstMixerTrack * track, gst_oss4_source_mixer_set_mute (GstMixer * mixer, GstMixerTrack * track,
gboolean mute) gboolean mute)
{ {
GstOss4Source *oss;
g_return_if_fail (mixer != NULL); g_return_if_fail (mixer != NULL);
g_return_if_fail (track != NULL); g_return_if_fail (track != NULL);
g_return_if_fail (GST_IS_MIXER_TRACK (track)); g_return_if_fail (GST_IS_MIXER_TRACK (track));
g_return_if_fail (GST_IS_OSS4_SOURCE (mixer)); g_return_if_fail (GST_IS_OSS4_SOURCE (mixer));
g_return_if_fail (GST_OSS4_SOURCE_IS_OPEN (mixer)); g_return_if_fail (GST_OSS4_SOURCE_IS_OPEN (mixer));
oss = GST_OSS4_SOURCE (mixer);
/* FIXME: implement gst_oss4_source_mixer_set_mute() - what to do here? */ /* FIXME: implement gst_oss4_source_mixer_set_mute() - what to do here? */
/* oss4_mixer_set_mute (mixer->mixer, track, mute); */ /* oss4_mixer_set_mute (mixer->mixer, track, mute); */
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment