From d6fe3175d075c997dead79738fa72639860a678e Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Wed, 11 Feb 2015 11:43:17 +0100 Subject: [PATCH] libusbgx: tests: Use cast_to_largest_integral_type() Direct cast from pointer to integer of different size causes ugly compiler warning. To avoid this use dedicated macro from cmocka. Change-Id: I56f4095dd8f98c8349d02b421f02de1d61e0b2b8 Signed-off-by: Krzysztof Opasiak --- tests/usbg-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/usbg-test.c b/tests/usbg-test.c index 4f3cb8e..e7ce209 100644 --- a/tests/usbg-test.c +++ b/tests/usbg-test.c @@ -426,6 +426,8 @@ int path_equal_display_error(const LargestIntegralType actual, const LargestInte void assert_path_equal(const char *actual, const char *expected) { - if (path_equal_display_error((const LargestIntegralType)actual, (const LargestIntegralType)expected) == 0) + if (path_equal_display_error( + cast_to_largest_integral_type(actual), + cast_to_largest_integral_type(expected)) == 0) fail(); } -- 2.7.4