mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
testsuite/caps/: fix small things to prevent warnings on 64bit
Original commit message from CVS: 2005-05-02 Zaheer Abbas Merali <zaheerabbas at merali dot org> * testsuite/caps/deserialize.c: (main): * testsuite/caps/sets.c: (check_caps): * testsuite/caps/simplify.c: (check_caps): fix small things to prevent warnings on 64bit
This commit is contained in:
parent
9f7946831f
commit
4be4551a62
7 changed files with 25 additions and 14 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-05-02 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* testsuite/caps/deserialize.c: (main):
|
||||
* testsuite/caps/sets.c: (check_caps):
|
||||
* testsuite/caps/simplify.c: (check_caps):
|
||||
fix small things to prevent warnings on 64bit
|
||||
|
||||
2005-05-02 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* docs/faq/Makefile.am:
|
||||
|
|
|
@ -18,7 +18,7 @@ main (int argc, char *argv[])
|
|||
char *data;
|
||||
char **list;
|
||||
int i;
|
||||
int length;
|
||||
gsize length;
|
||||
GstCaps *caps;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
|
|
@ -27,8 +27,8 @@ check_caps (const gchar * eins, const gchar * zwei)
|
|||
|
||||
one = gst_caps_from_string (eins);
|
||||
two = gst_caps_from_string (zwei);
|
||||
g_print (" A = %u\n", strlen (eins));
|
||||
g_print (" B = %u\n", strlen (zwei));
|
||||
g_print (" A = %u\n", (unsigned int) strlen (eins));
|
||||
g_print (" B = %u\n", (unsigned int) strlen (zwei));
|
||||
|
||||
test = gst_caps_intersect (one, two);
|
||||
if (gst_caps_is_equal (one, two)) {
|
||||
|
@ -37,14 +37,16 @@ check_caps (const gchar * eins, const gchar * zwei)
|
|||
g_assert (gst_caps_is_equal (two, test));
|
||||
} else if (!gst_caps_is_any (one) || gst_caps_is_empty (two)) {
|
||||
test2 = gst_caps_subtract (one, test);
|
||||
g_print (" A - B = %u\n", strlen (gst_caps_to_string (test2)));
|
||||
g_print (" A - B = %u\n",
|
||||
(unsigned int) strlen (gst_caps_to_string (test2)));
|
||||
/* test2 = one - (one A two) = one - two */
|
||||
test3 = gst_caps_intersect (test2, two);
|
||||
g_print (" empty = %s\n", gst_caps_to_string (test3));
|
||||
g_assert (gst_caps_is_empty (test3));
|
||||
gst_caps_free (test3);
|
||||
test3 = gst_caps_union (test2, two);
|
||||
g_print (" A + B = %u\n", strlen (gst_caps_to_string (test3)));
|
||||
g_print (" A + B = %u\n",
|
||||
(unsigned int) strlen (gst_caps_to_string (test3)));
|
||||
/* test3 = one - two + two = one + two */
|
||||
g_print (" A + B = %s\n", gst_caps_to_string (gst_caps_subtract (one,
|
||||
test3)));
|
||||
|
|
|
@ -43,8 +43,8 @@ check_caps (GstCaps * caps)
|
|||
gst_caps_get_size (caps) < gst_caps_get_size (old) ||
|
||||
strlen (after) < strlen (before) ? "REDUCED" :
|
||||
(gst_caps_get_size (old) < 2 ? " --- " : " "),
|
||||
gst_caps_get_size (old), strlen (before),
|
||||
gst_caps_get_size (caps), strlen (after));
|
||||
gst_caps_get_size (old), (unsigned int) strlen (before),
|
||||
gst_caps_get_size (caps), (unsigned int) strlen (after));
|
||||
|
||||
size_before += gst_caps_get_size (old);
|
||||
size_after += gst_caps_get_size (caps);
|
||||
|
|
|
@ -18,7 +18,7 @@ main (int argc, char *argv[])
|
|||
char *data;
|
||||
char **list;
|
||||
int i;
|
||||
int length;
|
||||
gsize length;
|
||||
GstCaps *caps;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
|
|
@ -27,8 +27,8 @@ check_caps (const gchar * eins, const gchar * zwei)
|
|||
|
||||
one = gst_caps_from_string (eins);
|
||||
two = gst_caps_from_string (zwei);
|
||||
g_print (" A = %u\n", strlen (eins));
|
||||
g_print (" B = %u\n", strlen (zwei));
|
||||
g_print (" A = %u\n", (unsigned int) strlen (eins));
|
||||
g_print (" B = %u\n", (unsigned int) strlen (zwei));
|
||||
|
||||
test = gst_caps_intersect (one, two);
|
||||
if (gst_caps_is_equal (one, two)) {
|
||||
|
@ -37,14 +37,16 @@ check_caps (const gchar * eins, const gchar * zwei)
|
|||
g_assert (gst_caps_is_equal (two, test));
|
||||
} else if (!gst_caps_is_any (one) || gst_caps_is_empty (two)) {
|
||||
test2 = gst_caps_subtract (one, test);
|
||||
g_print (" A - B = %u\n", strlen (gst_caps_to_string (test2)));
|
||||
g_print (" A - B = %u\n",
|
||||
(unsigned int) strlen (gst_caps_to_string (test2)));
|
||||
/* test2 = one - (one A two) = one - two */
|
||||
test3 = gst_caps_intersect (test2, two);
|
||||
g_print (" empty = %s\n", gst_caps_to_string (test3));
|
||||
g_assert (gst_caps_is_empty (test3));
|
||||
gst_caps_free (test3);
|
||||
test3 = gst_caps_union (test2, two);
|
||||
g_print (" A + B = %u\n", strlen (gst_caps_to_string (test3)));
|
||||
g_print (" A + B = %u\n",
|
||||
(unsigned int) strlen (gst_caps_to_string (test3)));
|
||||
/* test3 = one - two + two = one + two */
|
||||
g_print (" A + B = %s\n", gst_caps_to_string (gst_caps_subtract (one,
|
||||
test3)));
|
||||
|
|
|
@ -43,8 +43,8 @@ check_caps (GstCaps * caps)
|
|||
gst_caps_get_size (caps) < gst_caps_get_size (old) ||
|
||||
strlen (after) < strlen (before) ? "REDUCED" :
|
||||
(gst_caps_get_size (old) < 2 ? " --- " : " "),
|
||||
gst_caps_get_size (old), strlen (before),
|
||||
gst_caps_get_size (caps), strlen (after));
|
||||
gst_caps_get_size (old), (unsigned int) strlen (before),
|
||||
gst_caps_get_size (caps), (unsigned int) strlen (after));
|
||||
|
||||
size_before += gst_caps_get_size (old);
|
||||
size_after += gst_caps_get_size (caps);
|
||||
|
|
Loading…
Reference in a new issue