From 52445774628eaf930eca3316b0257dc02deb57f5 Mon Sep 17 00:00:00 2001 From: "Laszlo Boszormenyi (GCS)" Date: Wed, 22 Jan 2025 22:44:47 +0100 Subject: [PATCH] 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 --- lib/c_glib/test/testthrifttestclient.cpp | 4 ++-- lib/c_glib/test/testthrifttestzlibclient.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.30.2