Fix compiler warnings

Fixes bug #582715.
This commit is contained in:
James Andrewartha 2009-05-15 08:44:39 +02:00 committed by Sebastian Dröge
parent 0d9b6a62c8
commit 2410cd7a00
5 changed files with 11 additions and 9 deletions

View File

@ -604,7 +604,7 @@ gst_flv_mux_write_metadata (GstFlvMux * mux)
} else if (!strcmp (tag_name, GST_TAG_ARTIST) || } else if (!strcmp (tag_name, GST_TAG_ARTIST) ||
!strcmp (tag_name, GST_TAG_TITLE)) { !strcmp (tag_name, GST_TAG_TITLE)) {
gchar *s; gchar *s;
const gchar *t; const gchar *t = NULL;
if (!strcmp (tag_name, GST_TAG_ARTIST)) if (!strcmp (tag_name, GST_TAG_ARTIST))
t = "creator"; t = "creator";

View File

@ -201,6 +201,9 @@ gst_sunaudiomixer_ctrl_get_volume (GstSunAudioMixerCtrl * mixer,
gain = (int) audioinfo.monitor_gain; gain = (int) audioinfo.monitor_gain;
balance = audioinfo.record.balance; balance = audioinfo.record.balance;
break; break;
default:
g_assert_not_reached ();
break;
} }
if (balance == AUDIO_MID_BALANCE) { if (balance == AUDIO_MID_BALANCE) {

View File

@ -68,7 +68,6 @@ gst_sunaudiomixer_track_new (GstSunAudioTrackType track_num,
GstMixerTrack *track; GstMixerTrack *track;
GObjectClass *klass; GObjectClass *klass;
const gchar *untranslated_label; const gchar *untranslated_label;
gint volume;
if ((guint) track_num < G_N_ELEMENTS (labels)) if ((guint) track_num < G_N_ELEMENTS (labels))
untranslated_label = labels[track_num]; untranslated_label = labels[track_num];

View File

@ -312,8 +312,8 @@ gst_sunaudiosrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec)
GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc); GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc);
audio_info_t ainfo; audio_info_t ainfo;
int ret; int ret;
int ctrl_fd = -1; GstSunAudioMixerCtrl *mixer;
int ports; struct audio_info audioinfo;
ret = ioctl (sunaudiosrc->fd, AUDIO_GETINFO, &ainfo); ret = ioctl (sunaudiosrc->fd, AUDIO_GETINFO, &ainfo);
if (ret == -1) { if (ret == -1) {
@ -333,8 +333,7 @@ gst_sunaudiosrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec)
ainfo.record.encoding = AUDIO_ENCODING_LINEAR; ainfo.record.encoding = AUDIO_ENCODING_LINEAR;
ainfo.record.buffer_size = spec->buffer_time; ainfo.record.buffer_size = spec->buffer_time;
GstSunAudioMixerCtrl *mixer = sunaudiosrc->mixer; mixer = sunaudiosrc->mixer;
struct audio_info audioinfo;
if (ioctl (mixer->mixer_fd, AUDIO_GETINFO, &audioinfo) < 0) { if (ioctl (mixer->mixer_fd, AUDIO_GETINFO, &audioinfo) < 0) {
g_warning ("Error getting audio device volume"); g_warning ("Error getting audio device volume");

View File

@ -118,11 +118,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
GST_DEBUG_OBJECT (e, " channels"); GST_DEBUG_OBJECT (e, " channels");
/* and now, the channels */ /* and now, the channels */
for (n = 0;; n++) { for (n = 0;; n++) {
struct v4l2_input input = { 0, }; struct v4l2_input input;
GstV4l2TunerChannel *v4l2channel; GstV4l2TunerChannel *v4l2channel;
GstTunerChannel *channel; GstTunerChannel *channel;
memset (&input, 0, sizeof (input));
input.index = n; input.index = n;
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMINPUT, &input) < 0) { if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMINPUT, &input) < 0) {
if (errno == EINVAL) 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, " name: '%s'", input.name);
GST_LOG_OBJECT (e, " type: %08x", input.type); GST_LOG_OBJECT (e, " type: %08x", input.type);
GST_LOG_OBJECT (e, " audioset: %08x", input.audioset); 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); GST_LOG_OBJECT (e, " status: %08x", input.status);
v4l2channel = g_object_new (GST_TYPE_V4L2_TUNER_CHANNEL, NULL); v4l2channel = g_object_new (GST_TYPE_V4L2_TUNER_CHANNEL, NULL);