libusbgx: tests: Use cast_to_largest_integral_type()
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Wed, 11 Feb 2015 10:43:17 +0000 (11:43 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 20:45:34 +0000 (21:45 +0100)
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 <k.opasiak@samsung.com>
tests/usbg-test.c

index 4f3cb8e..e7ce209 100644 (file)
@@ -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();
 }