diff options
author | James Andrewartha <trs80@ucc.gu.uwa.edu.au> | 2009-05-15 08:44:39 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-15 15:14:52 +0200 |
commit | 2410cd7a003e4ce9977453c946152b9c9c80f20e (patch) | |
tree | 4e56582f98180dc29043ce87c674a7dbe890b36a /sys | |
parent | 0d9b6a62c894c55a059b8af3ae8cbed501db8938 (diff) |
Fix compiler warnings
Fixes bug #582715.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sunaudio/gstsunaudiomixerctrl.c | 3 | ||||
-rw-r--r-- | sys/sunaudio/gstsunaudiomixertrack.c | 1 | ||||
-rw-r--r-- | sys/sunaudio/gstsunaudiosrc.c | 7 | ||||
-rw-r--r-- | sys/v4l2/v4l2_calls.c | 7 |
4 files changed, 10 insertions, 8 deletions
diff --git a/sys/sunaudio/gstsunaudiomixerctrl.c b/sys/sunaudio/gstsunaudiomixerctrl.c index ea3950f3..c015c4c4 100644 --- a/sys/sunaudio/gstsunaudiomixerctrl.c +++ b/sys/sunaudio/gstsunaudiomixerctrl.c @@ -201,6 +201,9 @@ gst_sunaudiomixer_ctrl_get_volume (GstSunAudioMixerCtrl * mixer, gain = (int) audioinfo.monitor_gain; balance = audioinfo.record.balance; break; + default: + g_assert_not_reached (); + break; } if (balance == AUDIO_MID_BALANCE) { diff --git a/sys/sunaudio/gstsunaudiomixertrack.c b/sys/sunaudio/gstsunaudiomixertrack.c index c903e01b..41275626 100644 --- a/sys/sunaudio/gstsunaudiomixertrack.c +++ b/sys/sunaudio/gstsunaudiomixertrack.c @@ -68,7 +68,6 @@ gst_sunaudiomixer_track_new (GstSunAudioTrackType track_num, GstMixerTrack *track; GObjectClass *klass; const gchar *untranslated_label; - gint volume; if ((guint) track_num < G_N_ELEMENTS (labels)) untranslated_label = labels[track_num]; diff --git a/sys/sunaudio/gstsunaudiosrc.c b/sys/sunaudio/gstsunaudiosrc.c index 9f8ecc44..023b0990 100644 --- a/sys/sunaudio/gstsunaudiosrc.c +++ b/sys/sunaudio/gstsunaudiosrc.c @@ -312,8 +312,8 @@ gst_sunaudiosrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc); audio_info_t ainfo; int ret; - int ctrl_fd = -1; - int ports; + GstSunAudioMixerCtrl *mixer; + struct audio_info audioinfo; ret = ioctl (sunaudiosrc->fd, AUDIO_GETINFO, &ainfo); if (ret == -1) { @@ -333,8 +333,7 @@ gst_sunaudiosrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) ainfo.record.encoding = AUDIO_ENCODING_LINEAR; ainfo.record.buffer_size = spec->buffer_time; - GstSunAudioMixerCtrl *mixer = sunaudiosrc->mixer; - struct audio_info audioinfo; + mixer = sunaudiosrc->mixer; if (ioctl (mixer->mixer_fd, AUDIO_GETINFO, &audioinfo) < 0) { g_warning ("Error getting audio device volume"); diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index 8f1a6c65..267c8b17 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -118,11 +118,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) GST_DEBUG_OBJECT (e, " channels"); /* and now, the channels */ for (n = 0;; n++) { - struct v4l2_input input = { 0, }; + struct v4l2_input input; GstV4l2TunerChannel *v4l2channel; - GstTunerChannel *channel; + memset (&input, 0, sizeof (input)); + input.index = n; if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMINPUT, &input) < 0) { if (errno == EINVAL) @@ -141,7 +142,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) GST_LOG_OBJECT (e, " name: '%s'", input.name); GST_LOG_OBJECT (e, " type: %08x", input.type); GST_LOG_OBJECT (e, " audioset: %08x", input.audioset); - GST_LOG_OBJECT (e, " std: %016x", input.std); + GST_LOG_OBJECT (e, " std: %016x", (guint) input.std); GST_LOG_OBJECT (e, " status: %08x", input.status); v4l2channel = g_object_new (GST_TYPE_V4L2_TUNER_CHANNEL, NULL); |