From: Laszlo Boszormenyi (GCS) Date: Sun, 17 Sep 2023 13:13:50 +0000 (+0100) Subject: force double variable type for GLib testing for i386 X-Git-Tag: archive/raspbian/0.19.0-2.1+rpi1^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d24b75365db6177a8f92bfd7df1502cade22b933;p=thrift.git force double variable type for GLib testing for i386 Forwarded: no Last-Update: 2023-09-05 GLib double testing fail on i386 probably due to its smaller variable width. Make sure the numbers used as 'double' type. Gbp-Pq: Name glib_double_type_i386.patch --- diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp index 77daf3d..cba392c 100644 --- a/lib/c_glib/test/testthrifttestclient.cpp +++ b/lib/c_glib/test/testthrifttestclient.cpp @@ -420,8 +420,8 @@ test_thrift_client (void) assert (i64 == 12345); assert (error == nullptr); - assert (t_test_thrift_test_client_test_double (iface, &dbl, 5.6, &error) == TRUE); - assert (dbl == 5.6); + assert (t_test_thrift_test_client_test_double (iface, &dbl, (double)5.6, &error) == TRUE); + assert (dbl == (double)5.6); assert (error == nullptr); xtruct_out = (TTestXtruct *) g_object_new (T_TEST_TYPE_XTRUCT, nullptr); diff --git a/lib/c_glib/test/testthrifttestzlibclient.cpp b/lib/c_glib/test/testthrifttestzlibclient.cpp index 5c4b931..6e7858b 100644 --- a/lib/c_glib/test/testthrifttestzlibclient.cpp +++ b/lib/c_glib/test/testthrifttestzlibclient.cpp @@ -419,8 +419,8 @@ test_thrift_client (void) assert (i64 == 12345); assert (error == nullptr); - assert (t_test_thrift_test_client_test_double (iface, &dbl, 5.6, &error) == TRUE); - assert (dbl == 5.6); + assert (t_test_thrift_test_client_test_double (iface, &dbl, (double)5.6, &error) == TRUE); + assert (dbl == (double)5.6); assert (error == nullptr); xtruct_out = (TTestXtruct *) g_object_new (T_TEST_TYPE_XTRUCT, nullptr);