From ba6404f7d61cc001e1e3e2581accbd738ffbab09 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 13 May 2021 09:15:45 +0300 Subject: [PATCH] tests: spa-pod: fix int64 constant to work on all architectures the "long" type in spa-pod is int64_t, so we need to make sure we pass a 64-bit number there, otherwise the va_args is going to crash on some architectures while reading arguments off the stack --- tests/wp/spa-pod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/wp/spa-pod.c b/tests/wp/spa-pod.c index 0461db4a..04f23bfe 100644 --- a/tests/wp/spa-pod.c +++ b/tests/wp/spa-pod.c @@ -611,7 +611,7 @@ test_spa_pod_sequence (void) /* Static */ { g_autoptr (WpSpaPod) pod = wp_spa_pod_new_sequence (0, - 10, "Properties", "l", 9999, NULL); + 10, "Properties", "l", G_GINT64_CONSTANT (9999), NULL); g_assert_nonnull (pod); g_assert_true (wp_spa_pod_is_sequence (pod)); g_assert_cmpstr ("Spa:Pod:Sequence", ==, @@ -622,7 +622,7 @@ test_spa_pod_sequence (void) { g_autoptr (WpSpaPodBuilder) b = wp_spa_pod_builder_new_sequence (0); wp_spa_pod_builder_add_control (b, 10, "Properties"); - wp_spa_pod_builder_add_long (b, 9999); + wp_spa_pod_builder_add_long (b, G_GINT64_CONSTANT (9999)); g_autoptr (WpSpaPod) pod = wp_spa_pod_builder_end (b); g_assert_nonnull (pod); g_assert_true (wp_spa_pod_is_sequence (pod));