[Spice-commits] tests/util.c
Marc-André Lureau
elmarco at kemper.freedesktop.org
Mon Feb 10 05:43:15 PST 2014
tests/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e189c976943f346b712dd51285a30ff8cd4e819a
Author: Ryan Lortie <desrt at desrt.ca>
Date: Sun Feb 9 12:28:44 2014 -0500
utils tests: fix sign comparison problem
This test compares a guint8 and a gchar with '==' which fails when comparing
240 to -16, even though these are the same byte value. Add an explicit
'guchar' cast to correct the problem.
https://bugs.freedesktop.org/show_bug.cgi?id=74754
diff --git a/tests/util.c b/tests/util.c
index ecd83eb..e090f5c 100644
--- a/tests/util.c
+++ b/tests/util.c
@@ -150,7 +150,7 @@ static void test_set_bit(void)
}
}
for (j = 0 ; j < bytes; ++j) {
- g_assert(dest[j] == tests[i].dest[j]);
+ g_assert(dest[j] == (guchar) tests[i].dest[j]);
}
g_free(dest);
}
More information about the Spice-commits
mailing list