From bcbb58ccbd5996ecc6e045fd28669f33434d3a75 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Wed, 25 Apr 2012 18:42:04 +0200 Subject: [PATCH] volume: cast outputs to correct type before comparing --- tests/check/elements/volume.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/check/elements/volume.c b/tests/check/elements/volume.c index 99806e3..340d56d 100644 --- a/tests/check/elements/volume.c +++ b/tests/check/elements/volume.c @@ -1694,7 +1694,7 @@ GST_START_TEST (test_passthrough) GstElement *volume; GstBuffer *inbuffer, *outbuffer; GstCaps *caps; - gint16 in[2] = { 16384, -256 }; + gint16 *out, in[2] = { 16384, -256 }; GstMapInfo map; volume = setup_volume (); @@ -1718,8 +1718,8 @@ GST_START_TEST (test_passthrough) fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL); fail_unless (inbuffer == outbuffer); gst_buffer_map (outbuffer, &map, GST_MAP_READ); - GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], map.data[0], - map.data[1]); + out = (gint16 *) map.data; + GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], out[0], out[1]); fail_unless (memcmp (map.data, in, 4) == 0); gst_buffer_unmap (outbuffer, &map); @@ -1763,7 +1763,7 @@ GST_START_TEST (test_controller_processing) GstElement *volume; GstBuffer *inbuffer, *outbuffer; GstCaps *caps; - gint16 in[2] = { 16384, -256 }; + gint16 *out, in[2] = { 16384, -256 }; GstMapInfo map; GstSegment seg; @@ -1798,8 +1798,8 @@ GST_START_TEST (test_controller_processing) fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL); fail_unless (inbuffer == outbuffer); gst_buffer_map (outbuffer, &map, GST_MAP_READ); - GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], map.data[0], - map.data[1]); + out = (gint16 *) map.data; + GST_INFO ("expected %+5d %+5d real %+5d %+5d", in[0], in[1], out[0], out[1]); fail_unless (memcmp (map.data, in, 4) == 0); gst_buffer_unmap (outbuffer, &map); -- 2.7.4