From: Syam Sidhardhan Date: Mon, 18 Feb 2013 16:04:42 +0000 (+0530) Subject: tools: Fix compilation error with GINT_TO_POINTER X-Git-Tag: android-x86-4.4-r3~8445 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f6c3832afab51e63d28db33b5d069f2a642b6aaa;p=android-x86%2Fexternal-bluetooth-bluez.git tools: Fix compilation error with GINT_TO_POINTER Fixes the following error: tools/btmgmt.c: In function ‘index_rsp’: tools/btmgmt.c:756:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] tools/btmgmt.c: In function ‘cmd_info’: tools/btmgmt.c:791:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] cc1: all warnings being treated as errors make[1]: *** [tools/btmgmt.o] Error 1 make: *** [all] Error 2 --- diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 85e790b7a..9753724f8 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -753,7 +753,7 @@ static void index_rsp(uint8_t status, uint16_t len, const void *param, if (monitor) printf("hci%u ", index); - data = GINT_TO_POINTER(index); + data = GINT_TO_POINTER((int) index); if (mgmt_send(mgmt, MGMT_OP_READ_INFO, index, 0, NULL, info_rsp, data, NULL) == 0) { @@ -788,7 +788,7 @@ static void cmd_info(struct mgmt *mgmt, uint16_t index, int argc, char **argv) return; } - data = GINT_TO_POINTER(index); + data = GINT_TO_POINTER((int) index); if (mgmt_send(mgmt, MGMT_OP_READ_INFO, index, 0, NULL, info_rsp, data, NULL) == 0) {