Silence some 'variable may be used uninitialized' compiler warnings

When compiling with -DG_DISABLE_ASSERT
This commit is contained in:
Tim-Philipp Müller 2012-08-08 11:31:59 +01:00
parent 4de8bd004c
commit 787c314ec3
5 changed files with 11 additions and 4 deletions

View file

@ -209,6 +209,7 @@ gst_wavpack_dec_negotiate (GstWavpackDec * dec)
dec->width = 32; dec->width = 32;
break; break;
default: default:
fmt = GST_AUDIO_FORMAT_UNKNOWN;
g_assert_not_reached (); g_assert_not_reached ();
break; break;
} }

View file

@ -241,6 +241,7 @@ find_or_create_demux_pad_for_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc,
retpad = gst_object_ref (demuxpad->rtcp_pad); retpad = gst_object_ref (demuxpad->rtcp_pad);
break; break;
default: default:
retpad = NULL;
g_assert_not_reached (); g_assert_not_reached ();
} }
GST_PAD_UNLOCK (demux); GST_PAD_UNLOCK (demux);
@ -310,6 +311,7 @@ find_or_create_demux_pad_for_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc,
retpad = gst_object_ref (demuxpad->rtcp_pad); retpad = gst_object_ref (demuxpad->rtcp_pad);
break; break;
default: default:
retpad = NULL;
g_assert_not_reached (); g_assert_not_reached ();
} }

View file

@ -282,7 +282,7 @@ gst_oss4_audio_set_ringbuffer_channel_layout (GstObject * obj, gint fd,
} else if (GST_IS_OSS4_SOURCE (obj)) { } else if (GST_IS_OSS4_SOURCE (obj)) {
rb = GST_AUDIO_BASE_SRC (obj)->ringbuffer; rb = GST_AUDIO_BASE_SRC (obj)->ringbuffer;
} else } else
g_assert_not_reached (); g_return_if_reached ();
/* -1 = get info for currently open device (fd). This will fail with /* -1 = get info for currently open device (fd). This will fail with
* OSS build <= 1013 because of a bug in OSS */ * OSS build <= 1013 because of a bug in OSS */

View file

@ -218,8 +218,8 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer,
} }
case GST_V4L2_IO_USERPTR: case GST_V4L2_IO_USERPTR:
default: default:
newbuf = NULL;
g_assert_not_reached (); g_assert_not_reached ();
break;
} }
pool->num_allocated++; pool->num_allocated++;
@ -766,6 +766,7 @@ gst_v4l2_buffer_pool_acquire_buffer (GstBufferPool * bpool, GstBuffer ** buffer,
case GST_V4L2_IO_USERPTR: case GST_V4L2_IO_USERPTR:
default: default:
ret = GST_FLOW_ERROR;
g_assert_not_reached (); g_assert_not_reached ();
break; break;
} }
@ -788,12 +789,14 @@ gst_v4l2_buffer_pool_acquire_buffer (GstBufferPool * bpool, GstBuffer ** buffer,
case GST_V4L2_IO_USERPTR: case GST_V4L2_IO_USERPTR:
default: default:
ret = GST_FLOW_ERROR;
g_assert_not_reached (); g_assert_not_reached ();
break; break;
} }
break; break;
default: default:
ret = GST_FLOW_ERROR;
g_assert_not_reached (); g_assert_not_reached ();
break; break;
} }

View file

@ -1301,6 +1301,7 @@ gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc)
break; break;
#endif #endif
default: default:
format = GST_VIDEO_FORMAT_UNKNOWN;
g_assert_not_reached (); g_assert_not_reached ();
break; break;
} }
@ -1589,12 +1590,12 @@ gst_v4l2_object_probe_caps_for_format_and_size (GstV4l2Object * v4l2object,
gint int_width = width; gint int_width = width;
gint int_height = height; gint int_height = height;
if (!strcmp((char *)v4l2object->vcap.driver, "uvcvideo")) { if (!strcmp ((char *) v4l2object->vcap.driver, "uvcvideo")) {
/* /*
* UVC devices are never interlaced, and doing VIDIOC_TRY_FMT on them * UVC devices are never interlaced, and doing VIDIOC_TRY_FMT on them
* causes expensive and slow USB IO, so don't probe them for interlaced * causes expensive and slow USB IO, so don't probe them for interlaced
*/ */
interlaced = FALSE; interlaced = FALSE;
} else { } else {
/* Interlaced detection using VIDIOC_TRY/S_FMT */ /* Interlaced detection using VIDIOC_TRY/S_FMT */
if (!gst_v4l2_object_get_nearest_size (v4l2object, pixelformat, if (!gst_v4l2_object_get_nearest_size (v4l2object, pixelformat,