Fix a build error for 64-bit machine
authorsaerome.kim <saerome.kim@samsung.com>
Thu, 24 Oct 2019 22:40:50 +0000 (07:40 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Thu, 24 Oct 2019 23:04:30 +0000 (08:04 +0900)
- Problem: build error during test-hub
- Cause: The reason for the error is that the compiler suspects we might be
  trying to round-trip a pointer through int and back. This was common
  practice before the advent of 64-bit machines and it is not safe or reasonable.
- Solution: replace 'int' type-casting with 'intptr_t'.

Change-Id: I0fe0f8c4e8ebf6af45eb714f8284b7bc9371d1f8
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
test/uat-init.c

index ea42041d2836aff1303b79fec2d863299d981d53..2e58539f3c789c243e4e91539709f9bc1c6de0c8 100644 (file)
@@ -46,7 +46,7 @@ static void __user_detected_foreach_sensors(gpointer data,
        GSList *l = 0;
        int info_count = 0;
        GSList *values = NULL;
-       int type = (int)user_data;
+       int type = (intptr_t)user_data;
        unsigned long long timestamp;
        char buf[MENU_DATA_SIZE] = {0, };
        char final_buf[MENU_DATA_SIZE * 4] = {0, };