mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 06:52:41 +00:00
test: Avoid type-limit issue
``` ../subprojects/gstreamer/tests/check/elements/filesink.c: In function ‘test_seeking’: ../subprojects/gstreamer/tests/check/elements/filesink.c:92:23: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits] 92 | for (i = 0; i < num_bytes; ++i) \ | ^ ../subprojects/gstreamer/tests/check/elements/filesink.c:266:3: note: in expansion of macro ‘PUSH_BYTES’ 266 | PUSH_BYTES (0); | ^~~~~~~~~~ ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
This commit is contained in:
parent
a81371bf8b
commit
72df7ab3bd
1 changed files with 9 additions and 1 deletions
|
@ -95,6 +95,14 @@ cleanup_filesink (GstElement * filesink)
|
|||
g_rand_free (rand); \
|
||||
} G_STMT_END
|
||||
|
||||
#define PUSH_EMPTY_BUF() \
|
||||
G_STMT_START { \
|
||||
GstBuffer *buf = gst_buffer_new(); \
|
||||
if (sync_buffers) \
|
||||
GST_BUFFER_FLAG_SET(buf, GST_BUFFER_FLAG_SYNC_AFTER); \
|
||||
fail_unless_equals_int(gst_pad_push(mysrcpad, buf), GST_FLOW_OK); \
|
||||
} G_STMT_END
|
||||
|
||||
/* Push Buffer with num_mem_blocks memory block each of size num_bytes*/
|
||||
#define PUSH_BUFFER_WITH_MULTIPLE_MEM_BLOCKS(num_mem_blocks, num_bytes) \
|
||||
G_STMT_START { \
|
||||
|
@ -261,7 +269,7 @@ GST_START_TEST (test_seeking)
|
|||
CHECK_QUERY_POSITION (filesink, GST_FORMAT_BYTES, 0);
|
||||
|
||||
/* push buffer with size 0 and NULL data */
|
||||
PUSH_BYTES (0);
|
||||
PUSH_EMPTY_BUF ();
|
||||
CHECK_QUERY_POSITION (filesink, GST_FORMAT_BYTES, 0);
|
||||
|
||||
PUSH_BYTES (1);
|
||||
|
|
Loading…
Reference in a new issue