projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
284ea16
)
tests: Use GPOINTER_TO_SIZE() instead of just casting to guint
author
Benjamin Otte
<otte@redhat.com>
Thu, 22 Jul 2010 18:23:28 +0000
(20:23 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Thu, 22 Jul 2010 19:56:20 +0000
(21:56 +0200)
a) gcc doesn't like this ("Cast to pointer of different size)
b) It compares only half of the pointer
gio/tests/memory-output-stream.c
patch
|
blob
|
history
diff --git
a/gio/tests/memory-output-stream.c
b/gio/tests/memory-output-stream.c
index
953afa4
..
44b5624
100644
(file)
--- a/
gio/tests/memory-output-stream.c
+++ b/
gio/tests/memory-output-stream.c
@@
-115,7
+115,7
@@
test_properties (void)
gpointer data_fun = g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (mo));
gpointer data_prop;
g_object_get (mo, "data", &data_prop, NULL);
- g_assert_cmphex (
(guint) data_fun, ==, (guint) data_prop
);
+ g_assert_cmphex (
GPOINTER_TO_SIZE (data_fun), ==, GPOINTER_TO_SIZE (data_prop)
);
g_object_unref (o);
g_object_unref (mo);