mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
tests: fix some more unused-but-set-variable warnings with gcc 4.6
This commit is contained in:
parent
8d1ed65016
commit
4f6da2bcbc
5 changed files with 3 additions and 11 deletions
|
@ -573,7 +573,6 @@ GST_START_TEST (test_add_pad)
|
||||||
GstElement *bin, *src1, *src2, *adder, *sink;
|
GstElement *bin, *src1, *src2, *adder, *sink;
|
||||||
GstBus *bus;
|
GstBus *bus;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
GstStreamConsistency *consist;
|
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
GST_INFO ("preparing test");
|
GST_INFO ("preparing test");
|
||||||
|
@ -600,7 +599,6 @@ GST_START_TEST (test_add_pad)
|
||||||
fail_unless (res == TRUE, NULL);
|
fail_unless (res == TRUE, NULL);
|
||||||
|
|
||||||
srcpad = gst_element_get_static_pad (adder, "src");
|
srcpad = gst_element_get_static_pad (adder, "src");
|
||||||
consist = gst_consistency_checker_new (srcpad);
|
|
||||||
gst_object_unref (srcpad);
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
main_loop = g_main_loop_new (NULL, FALSE);
|
main_loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
@ -656,7 +654,6 @@ GST_START_TEST (test_remove_pad)
|
||||||
GstBus *bus;
|
GstBus *bus;
|
||||||
GstPad *pad, *srcpad;
|
GstPad *pad, *srcpad;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstStreamConsistency *consist;
|
|
||||||
|
|
||||||
GST_INFO ("preparing test");
|
GST_INFO ("preparing test");
|
||||||
|
|
||||||
|
@ -682,7 +679,6 @@ GST_START_TEST (test_remove_pad)
|
||||||
fail_if (pad == NULL, NULL);
|
fail_if (pad == NULL, NULL);
|
||||||
|
|
||||||
srcpad = gst_element_get_static_pad (adder, "src");
|
srcpad = gst_element_get_static_pad (adder, "src");
|
||||||
consist = gst_consistency_checker_new (srcpad);
|
|
||||||
gst_object_unref (srcpad);
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
main_loop = g_main_loop_new (NULL, FALSE);
|
main_loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
|
@ -174,7 +174,7 @@ check_rgb_buf (const guint8 * pixels, guint32 r_mask, guint32 g_mask,
|
||||||
guint32 b_mask, guint32 a_mask, guint8 r_expected, guint8 g_expected,
|
guint32 b_mask, guint32 a_mask, guint8 r_expected, guint8 g_expected,
|
||||||
guint8 b_expected, guint endianness, guint bpp, guint depth)
|
guint8 b_expected, guint endianness, guint bpp, guint depth)
|
||||||
{
|
{
|
||||||
guint32 pixel, red, green, blue, alpha;
|
guint32 pixel, red, green, blue;
|
||||||
|
|
||||||
switch (bpp) {
|
switch (bpp) {
|
||||||
case 32:{
|
case 32:{
|
||||||
|
@ -210,7 +210,7 @@ check_rgb_buf (const guint8 * pixels, guint32 r_mask, guint32 g_mask,
|
||||||
red = right_shift_colour (r_mask, pixel);
|
red = right_shift_colour (r_mask, pixel);
|
||||||
green = right_shift_colour (g_mask, pixel);
|
green = right_shift_colour (g_mask, pixel);
|
||||||
blue = right_shift_colour (b_mask, pixel);
|
blue = right_shift_colour (b_mask, pixel);
|
||||||
alpha = right_shift_colour (a_mask, pixel);
|
/* alpha = right_shift_colour (a_mask, pixel); */
|
||||||
|
|
||||||
/* can't enable this by default, valgrind will complain about accessing
|
/* can't enable this by default, valgrind will complain about accessing
|
||||||
* uninitialised memory for the depth=24,bpp=32 formats ... */
|
* uninitialised memory for the depth=24,bpp=32 formats ... */
|
||||||
|
|
|
@ -192,7 +192,7 @@ _create_audio_buffer (void)
|
||||||
{
|
{
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
ogg_packet packet;
|
ogg_packet packet;
|
||||||
float **vorbis_buffer;
|
float **vorbis_buffer G_GNUC_UNUSED;
|
||||||
|
|
||||||
vorbis_buffer = vorbis_analysis_buffer (&vd, 0);
|
vorbis_buffer = vorbis_analysis_buffer (&vd, 0);
|
||||||
vorbis_analysis_wrote (&vd, 0);
|
vorbis_analysis_wrote (&vd, 0);
|
||||||
|
|
|
@ -635,12 +635,10 @@ GST_START_TEST (test_rtcp_buffer)
|
||||||
{
|
{
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
GstRTCPPacket packet;
|
GstRTCPPacket packet;
|
||||||
guint8 *data;
|
|
||||||
|
|
||||||
buf = gst_rtcp_buffer_new (1400);
|
buf = gst_rtcp_buffer_new (1400);
|
||||||
fail_unless (buf != NULL);
|
fail_unless (buf != NULL);
|
||||||
fail_unless_equals_int (GST_BUFFER_SIZE (buf), 1400);
|
fail_unless_equals_int (GST_BUFFER_SIZE (buf), 1400);
|
||||||
data = GST_BUFFER_DATA (buf);
|
|
||||||
|
|
||||||
fail_unless (gst_rtcp_buffer_get_first_packet (buf, &packet) == FALSE);
|
fail_unless (gst_rtcp_buffer_get_first_packet (buf, &packet) == FALSE);
|
||||||
fail_unless (gst_rtcp_buffer_get_packet_count (buf) == 0);
|
fail_unless (gst_rtcp_buffer_get_packet_count (buf) == 0);
|
||||||
|
|
|
@ -272,7 +272,6 @@ GST_START_TEST (test_continuity)
|
||||||
|
|
||||||
{
|
{
|
||||||
GstClockTime next_timestamp;
|
GstClockTime next_timestamp;
|
||||||
gint64 last_granulepos;
|
|
||||||
|
|
||||||
/* first buffer should have timestamp of TIMESTAMP_OFFSET, granulepos to
|
/* first buffer should have timestamp of TIMESTAMP_OFFSET, granulepos to
|
||||||
* match the timestamp of the end of the last sample in the output buffer.
|
* match the timestamp of the end of the last sample in the output buffer.
|
||||||
|
@ -281,7 +280,6 @@ GST_START_TEST (test_continuity)
|
||||||
* take care to timestamp correctly based on the offset of the input data
|
* take care to timestamp correctly based on the offset of the input data
|
||||||
* however, so it does do sub-granulepos timestamping. */
|
* however, so it does do sub-granulepos timestamping. */
|
||||||
buffer = gst_buffer_straw_get_buffer (bin, pad);
|
buffer = gst_buffer_straw_get_buffer (bin, pad);
|
||||||
last_granulepos = GST_BUFFER_OFFSET_END (buffer);
|
|
||||||
check_buffer_timestamp (buffer, 0);
|
check_buffer_timestamp (buffer, 0);
|
||||||
/* plain division because I know the answer is exact */
|
/* plain division because I know the answer is exact */
|
||||||
check_buffer_duration (buffer, GST_SECOND / 10);
|
check_buffer_duration (buffer, GST_SECOND / 10);
|
||||||
|
|
Loading…
Reference in a new issue