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;
} }