THRIFT-3386 misc. warnings with make check c_glib: Add explicit casts to prevent compiler warnings during "make check" Client: c_glib Patch: Simon South
This closes #751 Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/a873e160 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/a873e160 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/a873e160 Branch: refs/heads/master Commit: a873e1609724d51a89ac07f03c1e96531866e2ea Parents: 39e505c Author: Simon South <[email protected]> Authored: Sun Dec 20 17:44:24 2015 -0500 Committer: Nobuaki Sukegawa <[email protected]> Committed: Thu Dec 24 02:11:17 2015 +0900 ---------------------------------------------------------------------- test/c_glib/src/thrift_test_handler.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/a873e160/test/c_glib/src/thrift_test_handler.c ---------------------------------------------------------------------- diff --git a/test/c_glib/src/thrift_test_handler.c b/test/c_glib/src/thrift_test_handler.c index 86b29dd..8312ad9 100644 --- a/test/c_glib/src/thrift_test_handler.c +++ b/test/c_glib/src/thrift_test_handler.c @@ -144,8 +144,8 @@ thrift_test_handler_test_binary (TTestThriftTestIf *iface, THRIFT_UNUSED_VAR (error); printf ("testBinary()\n"); // TODO: hex output - g_byte_array_ref(thing); - *_return = thing; + g_byte_array_ref((GByteArray *)thing); + *_return = (GByteArray *)thing; return TRUE; } @@ -515,17 +515,17 @@ thrift_test_handler_test_insanity (TTestThriftTestIf *iface, g_hash_table_insert (first_map, GINT_TO_POINTER (T_TEST_NUMBERZ_TWO), - argument); + (gpointer)argument); g_hash_table_insert (first_map, GINT_TO_POINTER (T_TEST_NUMBERZ_THREE), - argument); + (gpointer)argument); /* Increment argument's ref count since first_map now holds two references to it and would otherwise attempt to deallocate it twice during destruction. We do this instead of creating a copy of argument in order to mimic the C++ implementation (and since, frankly, the world needs less argument, not more). */ - g_object_ref (argument); + g_object_ref ((gpointer)argument); looney = g_object_new (T_TEST_TYPE_INSANITY, NULL); g_hash_table_insert (second_map,
