summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2017-01-25 00:34:13 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2017-01-25 00:35:47 +0000
commit2ad79db3a3e9c315152b3470a6cb2fba644d7ac8 (patch)
tree7e867e3e29d80a803393237e38d1eb325fd10957
parenta28e91c0687b12fa05f16847106493143ad53125 (diff)
downloadlibgdata-2ad79db3a3e9c315152b3470a6cb2fba644d7ac8.tar.gz
tests: Fix use of an unsigned variable as signed
This code was supposed to be using a signed variable for the comparison, but accidentally ended up using a signed one (and the wrong abs() function). Fix that. Spotted by Clang.
-rw-r--r--gdata/tests/picasaweb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdata/tests/picasaweb.c b/gdata/tests/picasaweb.c
index 6a9f71e5..b77f7c8b 100644
--- a/gdata/tests/picasaweb.c
+++ b/gdata/tests/picasaweb.c
@@ -1778,7 +1778,7 @@ test_album_new (void)
gchar *xml, *parsed_time_str;
GRegex *regex;
GMatchInfo *match_info;
- guint64 delta;
+ gint64 delta;
GTimeVal timeval;
g_test_bug ("598893");
@@ -1818,7 +1818,7 @@ test_album_new (void)
g_assert (g_regex_match (regex, xml, 0, &match_info) == TRUE);
parsed_time_str = g_match_info_fetch (match_info, 2);
delta = g_ascii_strtoull (parsed_time_str, NULL, 10) - (((guint64) timeval.tv_sec) * 1000 + ((guint64) timeval.tv_usec) / 1000);
- g_assert_cmpuint (abs (delta), <, 1000);
+ g_assert_cmpuint (ABS (delta), <, 1000);
g_free (parsed_time_str);
g_free (xml);