mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
tests: Address unused but set variables
GCC 4.6.x spits warnings about such usage of variables.
This commit is contained in:
parent
e757793b21
commit
4893678fd1
6 changed files with 7 additions and 14 deletions
|
@ -28,7 +28,7 @@
|
|||
static gboolean
|
||||
gst_caps_is_interlaced (GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstStructure G_GNUC_UNUSED *structure;
|
||||
gboolean interlaced = FALSE;
|
||||
|
||||
fail_unless (gst_caps_is_fixed (caps));
|
||||
|
|
|
@ -291,13 +291,12 @@ rtp_pipeline_run (rtp_pipeline * p)
|
|||
for (i = 0; i < LOOP_COUNT; i++) {
|
||||
const char *frame_data_pointer = p->frame_data;
|
||||
int res;
|
||||
|
||||
int frame_count = p->frame_count;
|
||||
|
||||
/* Write in to the pipe. */
|
||||
while (frame_count > 0) {
|
||||
res = write (p->fd[1], frame_data_pointer, p->frame_data_size);
|
||||
|
||||
fail_unless_equals_int (res, p->frame_data_size);
|
||||
frame_data_pointer += p->frame_data_size;
|
||||
frame_count--;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,6 @@ GST_START_TEST (test_decode_seek_full)
|
|||
GstEvent *event;
|
||||
GstBuffer *buffer = NULL;
|
||||
guint16 first_sample = 0;
|
||||
gboolean result;
|
||||
guint size = 0;
|
||||
gchar *path =
|
||||
g_build_filename (GST_TEST_FILES_PATH, "audiotestsrc.flac", NULL);
|
||||
|
@ -133,7 +132,7 @@ GST_START_TEST (test_decode_seek_full)
|
|||
/* do a seek that should give us the complete output */
|
||||
event = gst_event_new_seek (1.0, GST_FORMAT_DEFAULT, GST_SEEK_FLAG_FLUSH,
|
||||
GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, 20480);
|
||||
result = gst_element_send_event (appsink, event);
|
||||
fail_unless (gst_element_send_event (appsink, event));
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
|
||||
|
@ -169,7 +168,6 @@ GST_START_TEST (test_decode_seek_partial)
|
|||
GstElement *appsink;
|
||||
GstEvent *event;
|
||||
GstBuffer *buffer = NULL;
|
||||
gboolean result;
|
||||
guint size = 0;
|
||||
guint16 first_sample = 0;
|
||||
gchar *path =
|
||||
|
@ -194,7 +192,7 @@ GST_START_TEST (test_decode_seek_partial)
|
|||
event = gst_event_new_seek (1.0, GST_FORMAT_DEFAULT, GST_SEEK_FLAG_FLUSH,
|
||||
GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, 1024);
|
||||
GST_DEBUG ("seeking");
|
||||
result = gst_element_send_event (appsink, event);
|
||||
fail_unless (gst_element_send_event (appsink, event));
|
||||
GST_DEBUG ("seeked");
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
|
|
|
@ -82,7 +82,7 @@ main (int argc, char *argv[])
|
|||
GstElement *pipeline;
|
||||
GstCaps *caps;
|
||||
GstBus *bus;
|
||||
gint watch_id;
|
||||
guint watch_id;
|
||||
GMainLoop *loop;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
@ -120,5 +120,7 @@ main (int argc, char *argv[])
|
|||
loop = g_main_loop_new (NULL, FALSE);
|
||||
g_main_loop_run (loop);
|
||||
|
||||
g_source_remove (watch_id);
|
||||
g_main_loop_unref (loop);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -190,7 +190,6 @@ main (int argc, char **argv)
|
|||
GError *opt_err = NULL;
|
||||
|
||||
GstElement *pipeline, *src, *filter1, *crop, *scale, *filter2, *csp, *sink;
|
||||
GMainLoop *loop;
|
||||
GstCaps *filter_caps = NULL;
|
||||
GList *caps_list, *l;
|
||||
|
||||
|
@ -209,8 +208,6 @@ main (int argc, char **argv)
|
|||
|
||||
GST_DEBUG_CATEGORY_INIT (videocrop_test_debug, "videocroptest", 0, "vctest");
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
src = gst_element_factory_make ("videotestsrc", "videotestsrc");
|
||||
g_assert (src != NULL);
|
||||
|
|
|
@ -37,7 +37,6 @@ int
|
|||
main (int argc, char **argv)
|
||||
{
|
||||
GstElement *pipeline;
|
||||
GstBus *bus;
|
||||
#ifndef G_DISABLE_ASSERT
|
||||
GstState state, pending;
|
||||
#endif
|
||||
|
@ -53,8 +52,6 @@ main (int argc, char **argv)
|
|||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
|
||||
/* lets check it gets to PLAYING */
|
||||
|
|
Loading…
Reference in a new issue