QNX IPC: Samples - Fix Compile Warnings
authorAngela Stegmaier <angelabaker@ti.com>
Wed, 29 May 2013 15:38:06 +0000 (10:38 -0500)
committerChris Ring <cring@ti.com>
Wed, 5 Jun 2013 18:08:01 +0000 (11:08 -0700)
This patch fixes the following compilation warnings:

qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/tests_rpc_stress.c:
In function 'test_exec_call':
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/tests_rpc_stress.c:280:
warning: assignment makes integer from pointer without a cast
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/tests_rpc_stress.c:376:
warning: format '%x' expects type 'unsigned int', but argument 2 has type
'int *'
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/tests_rpc_stress.c:376:
warning: format '%x' expects type 'unsigned int', but argument 3 has type
'void *'

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/tests_rpc_stress.c

index b653ce64e9f8650b42e2c659c49d8896a57a4957..6783f7b82b688667a3435b2e253bdbf8a1c91317 100644 (file)
@@ -277,7 +277,7 @@ void * test_exec_call(void * arg)
                     function->num_translations = 1;
                     function->translations[0].index = 0;
                     function->translations[0].offset = (int)&(((fxn_addx_args *)ptr)->array) - (int)ptr;
-                    function->translations[0].base = ((fxn_addx_args *)ptr)->array;
+                    function->translations[0].base = (size_t)(((fxn_addx_args *)ptr)->array);
                 }
                 break;
             case FXN_IDX_FXNFAULT:
@@ -373,7 +373,7 @@ void * test_exec_call(void * arg)
                     if (((fxn_addx_args *)ptr)->array != ptr2) {
                         printf("rpc_stress: reverse addr translation failed, "
                                "addr = 0x%x expected 0x%x\n",
-                               ((fxn_addx_args *)ptr)->array, ptr2);
+                               (int)(((fxn_addx_args *)ptr)->array), (int)ptr2);
                         test_status = -1;
                     }
                     printf ("rpc_stress: called fxnAddX(%d,%d,%d), result = %d\n",