From: caro Date: Sat, 16 Jan 2010 13:50:57 +0000 (+0000) Subject: do not do arithmetic pointer on void X-Git-Tag: build/2012-07-04.173327~2279 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1d55c2c9d7a45643b6ed42a1b77085b40059829;p=profile%2Fivi%2Fecore.git do not do arithmetic pointer on void git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@45220 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_con/ecore_con_info.c b/src/lib/ecore_con/ecore_con_info.c index 7d9ce93..9ef09fb 100644 --- a/src/lib/ecore_con/ecore_con_info.c +++ b/src/lib/ecore_con/ecore_con_info.c @@ -241,8 +241,8 @@ ecore_con_info_get(Ecore_Con_Server *svr, container->size = tosend_len; memcpy(&container->info, result, sizeof(struct addrinfo)); - memcpy(tosend + sizeof(Ecore_Con_Info), result->ai_addr, result->ai_addrlen); - memcpy(tosend + sizeof(Ecore_Con_Info) + result->ai_addrlen, result->ai_canonname, canonname_len); + memcpy((char *)tosend + sizeof(Ecore_Con_Info), result->ai_addr, result->ai_addrlen); + memcpy((char *)tosend + sizeof(Ecore_Con_Info) + result->ai_addrlen, result->ai_canonname, canonname_len); if (!getnameinfo(result->ai_addr, result->ai_addrlen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), @@ -298,15 +298,15 @@ _ecore_con_info_readdata(CB_Data *cbdata) memcpy(torecv, &container, sizeof(Ecore_Con_Info)); - size = read(ecore_main_fd_handler_fd_get(cbdata->fdh), torecv + sizeof(Ecore_Con_Info), + size = read(ecore_main_fd_handler_fd_get(cbdata->fdh), (char *)torecv + sizeof(Ecore_Con_Info), torecv_len - sizeof(Ecore_Con_Info)); if (size == torecv_len - sizeof(Ecore_Con_Info)) { recv = (Ecore_Con_Info *)torecv; - recv->info.ai_addr = torecv + sizeof(Ecore_Con_Info); + recv->info.ai_addr = (char *)torecv + sizeof(Ecore_Con_Info); if (torecv_len != (sizeof(Ecore_Con_Info) + recv->info.ai_addrlen)) - recv->info.ai_canonname = torecv + sizeof(Ecore_Con_Info) + recv->info.ai_addrlen; + recv->info.ai_canonname = (char *)torecv + sizeof(Ecore_Con_Info) + recv->info.ai_addrlen; else recv->info.ai_canonname = NULL; recv->info.ai_next = NULL;