Fix FTBFS for x86_64 71/27271/5 accepted/tizen/ivi/20140915.154443 submit/tizen_ivi/20140915.131507
authorMikko Ylinen <mikko.ylinen@intel.com>
Tue, 9 Sep 2014 13:57:39 +0000 (16:57 +0300)
committerMikko Ylinen <mikko.ylinen@intel.com>
Mon, 15 Sep 2014 07:10:34 +0000 (00:10 -0700)
In all cases, the build failure was caused by a 64bit
pointer being casted to an int and then int being used
in debug log formatting (%x).

Better solution is to use %p and cast pointers to
void *.

v2: do less casting
v3: use reinterpret_cast<>() anyway but change cast to intptr_t

Change-Id: I66e5cc2b3645210a675e27f8f82f7b12a81ac0e1
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
lib/system-controller/CicoSCServer.cpp
lib/system-controller/CicoSCWayland.cpp
lib/system-controller/CicoSCWlWinMgrIF.cpp
src/homescreen/CicoHSMenuTile.cpp
src/homescreen/CicoHSMenuTouch.cpp
src/homescreen/CicoHSMenuWindow.cpp
src/homescreen/CicoHSServer.cpp
src/homescreen/CicoHSSwipeTouch.cpp
src/onscreen/CicoOSClient.cpp
src/onscreen/CicoOSPopWindow.cpp

index fc26c58..7ce52d8 100644 (file)
@@ -566,12 +566,12 @@ CicoSCServer::receiveEventCB(const struct ico_uws_context *context,
 
     switch (event) {
     case ICO_UWS_EVT_CLOSE:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=%p)", id);
 //        ICO_TRA("CicoSCServer::receiveEventCB Leave");
         return;
     case ICO_UWS_EVT_ERROR:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=0x%08x, err=%d)",
-                (int)id, detail->_ico_uws_error.code);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=%p, err=%d)",
+                id, detail->_ico_uws_error.code);
 //        ICO_TRA("CicoSCServer::receiveEventCB Leave");
         return;
     default:
@@ -590,16 +590,16 @@ CicoSCServer::receiveEventCB(const struct ico_uws_context *context,
 
     switch (event) {
     case ICO_UWS_EVT_OPEN:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_OPEN(id=0x%08x)", (int)id);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_OPEN(id=%p)", id);
         break;  // break of switch event
     case ICO_UWS_EVT_CLOSE:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=%p)", id);
         delete handler;
         break;  // break of switch event
     case ICO_UWS_EVT_RECEIVE:
     {
-        ICO_DBG(">>>RECV ICO_UWS_EVT_RECEIVE(id=0x%08x, msg=%s, len=%d)",
-                (int)id, (char *)detail->_ico_uws_message.recv_data,
+        ICO_DBG(">>>RECV ICO_UWS_EVT_RECEIVE(id=%p, msg=%s, len=%d)",
+                id, (char *)detail->_ico_uws_message.recv_data,
                 detail->_ico_uws_message.recv_len);
 
         // convert message to command
@@ -635,14 +635,14 @@ CicoSCServer::receiveEventCB(const struct ico_uws_context *context,
         break;  // break of switch event
     }
     case ICO_UWS_EVT_ADD_FD:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=0x%08x, fd=%d)",
-                (int)id, detail->_ico_uws_fd.fd);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=%p, fd=%d)",
+                id, detail->_ico_uws_fd.fd);
         handler->fd = detail->_ico_uws_fd.fd;
         addPollFd(handler);
         break;  // break of switch event
     case ICO_UWS_EVT_DEL_FD:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=0x%08x, fd=%d, appid=%s)",
-                (int)id, detail->_ico_uws_fd.fd, handler->appid.c_str());
+        ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=%p, fd=%d, appid=%s)",
+                id, detail->_ico_uws_fd.fd, handler->appid.c_str());
         clearRecvCmdQueue(handler->appid);
         clearSendMsgQueue(handler->appid);
         delPollFd(handler);
index a9ae56b..ce27848 100644 (file)
@@ -147,7 +147,7 @@ CicoSCWayland::initialize(void)
             break;
         }
         ICO_DBG("called: wl_display_dispatch"
-                "(wlDisplay=0x%08x)", (int)m_wlDisplay);
+                "(wlDisplay=%p)", (void *)m_wlDisplay);
         wl_display_dispatch(m_wlDisplay);
         usleep(20*1000);
     }
@@ -162,10 +162,10 @@ CicoSCWayland::initialize(void)
     }
 
     // flush display 
-    ICO_DBG("called: wl_display_flush(wlDisplay=0x%08x)", (int)m_wlDisplay);
+    ICO_DBG("called: wl_display_flush(wlDisplay=%p)", (void *)m_wlDisplay);
     wl_display_flush(m_wlDisplay);
 
-    ICO_DBG("called: wl_display_get_fd(wlDisplay=0x%08x)", (int)m_wlDisplay);
+    ICO_DBG("called: wl_display_get_fd(wlDisplay=%p)", (void *)m_wlDisplay);
     m_wlFd = wl_display_get_fd(m_wlDisplay);
     ICO_DBG("CicoSCWayland::initialize: Wayland/Weston fd=%d", m_wlFd);
 
index 5554dfe..63e7b8a 100644 (file)
@@ -1113,7 +1113,7 @@ CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB(void *data,
     uint32_t                        id_surface;
     int                             surface_count;
 
-    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Enter(surf=%08x)", (int)surface);
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Enter(surf=%p)", (void *)surface);
 
     if (NULL == data) {
         ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Leave(data is null)");
index d3a98c0..2a6e115 100644 (file)
@@ -180,7 +180,7 @@ CicoHSMenuTile::FreeObject(void)
 {
     char    sWork[PATH_MAX];
 
-    ICO_DBG("CicoHSMenuTile::FreeObject(appid=%08x<%s>)", (int)this->appid, appid);
+    ICO_DBG("CicoHSMenuTile::FreeObject(appid=%p<%s>)", this->appid, appid);
 
     if (thumb.surface)  {
         sprintf(sWork, "%s/%08x.bpm", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
@@ -242,8 +242,8 @@ CicoHSMenuTile::MovePosition(int page, int position)
     pos_x = GetPositionX();
     pos_y = GetPositionY();
 
-    ICO_DBG("CicoHSMenuTile::MovePosition(appid=%08x<%s> tile=(%d,%d))",
-            (int)this->appid, appid, pos_x, pos_y);
+    ICO_DBG("CicoHSMenuTile::MovePosition(appid=%p<%s> tile=(%d,%d))",
+            this->appid, appid, pos_x, pos_y);
 
     evas_object_move(tile, pos_x, pos_y);
     if (thumb_tile) {
@@ -275,9 +275,9 @@ CicoHSMenuTile::OffsetMove(int offset_x, int offset_y)
     pos_x = GetPositionX() + offset_x;
     pos_y = GetPositionY() + offset_y;
 
-    ICO_DBG("CicoHSMenuTile::OffsetMove(appid=%08x<%s> offset=%d,%d tile=(%d,%d) obj=%08x %08x %08x)",
-            (int)this->appid, appid, offset_x, offset_y, pos_x, pos_y,
-            (int)this->icon, (int)this->tile, (int)this->thumb_tile);
+    ICO_DBG("CicoHSMenuTile::OffsetMove(appid=%p<%s> offset=%d,%d tile=(%d,%d) obj=%p %p %p)",
+            this->appid, appid, offset_x, offset_y, pos_x, pos_y,
+            this->icon, this->tile, this->thumb_tile);
 
     evas_object_move(tile, pos_x, pos_y);
     if (thumb_tile) {
@@ -521,8 +521,8 @@ CicoHSMenuTile::ValidThumbnail(int surface)
 {
     char    sWork[PATH_MAX];
 
-    ICO_DBG("CicoHSMenuTile::ValidThumbnail(appid=%08x<%s>) run=%d surf=%08x",
-            (int)this->appid, appid, app_running, surface);
+    ICO_DBG("CicoHSMenuTile::ValidThumbnail(appid=%p<%s>) run=%d surf=%08x",
+            this->appid, appid, app_running, surface);
 
     if ((! app_running) || (surface == 0))  {
         if (thumb.surface != 0) {
@@ -625,8 +625,8 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
 #pragma pack(pop)
 #endif
 
-    ICO_DBG("CicoHSMenuTile::SetThumbnail(appid=%08x<%s>) info=%08x surf=%08x",
-            (int)this->appid, appid, (int)info, info ? info->surface : 0);
+    ICO_DBG("CicoHSMenuTile::SetThumbnail(appid=%p<%s>) info=%p surf=%08x",
+            this->appid, appid, info, info ? info->surface : 0);
 
     if ((info == NULL) || (info->surface == 0)) {
         unmap = 1;
@@ -842,8 +842,8 @@ void
 CicoHSMenuTile::SetOrgThumbnail(CicoHSMenuTile *orgTile)
 {
 
-    ICO_DBG("CicoHSMenuTile::SetOrgThumbnail Enter(appid=%08x<%s>) run=%d surf=%08x",
-            (int)this->appid, this->appid, app_running, orgTile->thumb.surface );
+    ICO_DBG("CicoHSMenuTile::SetOrgThumbnail Enter(appid=%p<%s>) run=%d surf=%08x",
+            this->appid, this->appid, app_running, orgTile->thumb.surface );
 
     /* check surface of orgTile */
     if ( orgTile == NULL || orgTile->thumb.surface == 0 ) {
@@ -865,8 +865,8 @@ CicoHSMenuTile::SetOrgThumbnail(CicoHSMenuTile *orgTile)
 
     SetThumbnail( &info );
 
-    ICO_DBG("CicoHSMenuTile::SetOrgThumbnail Leave(appid=%08x<%s>) run=%d surf=%08x",
-            (int)this->appid, this->appid, app_running, orgTile->thumb.surface );
+    ICO_DBG("CicoHSMenuTile::SetOrgThumbnail Leave(appid=%p<%s>) run=%d surf=%08x",
+            this->appid, this->appid, app_running, orgTile->thumb.surface );
 
 }
 // vim: set expandtab ts=4 sw=4:
index 67a66cc..92e5cd4 100644 (file)
@@ -106,8 +106,8 @@ CicoHSMenuTouch::TouchDownMenu(void *data, Evas *evas, Evas_Object *obj, void *e
     char *appid = reinterpret_cast<char*>(data);
 
     if (appid == NULL) {
-        ICO_DBG("CicoHSMenuTouch::TouchDownMenu: %08x (%d,%d) No App",
-            (int)data, touch_state_b_x, touch_state_b_y);
+        ICO_DBG("CicoHSMenuTouch::TouchDownMenu: %p (%d,%d) No App",
+            data, touch_state_b_x, touch_state_b_y);
         return;
     }
     ICO_PRF("TOUCH_EVENT Menu Down (%d,%d) app=%s",
index bd67e73..d4fcb70 100644 (file)
@@ -917,7 +917,7 @@ CicoHSMenuWindow::MoveToNextAnimation(void *data,double pos)
 {
     int current_page;
     double frame = ecore_animator_pos_map(pos, ECORE_POS_MAP_LINEAR, 0.5, 1);
-    current_page = reinterpret_cast<int>(data);
+    current_page = reinterpret_cast<intptr_t>(data);
 
     for (int ii = 0;ii < menu_window_instance->all_tile_num;ii++) {
         if (menu_window_instance->menu_tile[ii] == NULL) {
@@ -961,7 +961,7 @@ CicoHSMenuWindow::MoveToBackAnimation(void *data,double pos)
 {
     int current_page;
     double frame = ecore_animator_pos_map(pos, ECORE_POS_MAP_LINEAR, 0.5, 1);
-    current_page = reinterpret_cast<int>(data);
+    current_page = reinterpret_cast<intptr_t>(data);
 
     for (int ii = 0;ii < menu_window_instance->all_tile_num;ii++) {
         if (menu_window_instance->menu_tile[ii] == NULL) {
index 61db539..1e57f8c 100644 (file)
@@ -465,12 +465,12 @@ CicoHSServer::receiveEventCB(const struct ico_uws_context *context,
 
     switch (event) {
     case ICO_UWS_EVT_CLOSE:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=%p)", id);
 //        ICO_TRA("CicoHSServer::receiveEventCB Leave");
         return;
     case ICO_UWS_EVT_ERROR:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=0x%08x, err=%d)", 
-                (int)id, detail->_ico_uws_error.code);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=%p, err=%d)",
+                id, detail->_ico_uws_error.code);
 //        ICO_TRA("CicoHSServer::receiveEventCB Leave");
         return;
     default:
@@ -489,16 +489,16 @@ CicoHSServer::receiveEventCB(const struct ico_uws_context *context,
 
     switch (event) {
     case ICO_UWS_EVT_OPEN:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_OPEN(id=0x%08x)", (int)id); 
+        ICO_DBG(">>>RECV ICO_UWS_EVT_OPEN(id=%p)", id);
         break;
     case ICO_UWS_EVT_CLOSE:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=%p)", id);
         delete handler;
         break;
     case ICO_UWS_EVT_RECEIVE:
     {
-        ICO_DBG(">>>RECV ICO_UWS_EVT_RECEIVE(id=0x%08x, msg=%s, len=%d)", 
-                (int)id, (char *)detail->_ico_uws_message.recv_data,
+        ICO_DBG(">>>RECV ICO_UWS_EVT_RECEIVE(id=%p, msg=%s, len=%d)",
+                id, (char *)detail->_ico_uws_message.recv_data,
                 detail->_ico_uws_message.recv_len);
 
         // convert message to command
@@ -511,14 +511,14 @@ CicoHSServer::receiveEventCB(const struct ico_uws_context *context,
         break;
     }
     case ICO_UWS_EVT_ADD_FD:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=0x%08x, fd=%d)",
-                (int)id, detail->_ico_uws_fd.fd);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=%p, fd=%d)",
+                id, detail->_ico_uws_fd.fd);
         handler->fd = detail->_ico_uws_fd.fd;
         addPollFd(handler);
         break;
     case ICO_UWS_EVT_DEL_FD:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=0x%08x, fd=%d, appid=%s)",
-                (int)id, detail->_ico_uws_fd.fd, handler->appid.c_str());
+        ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=%p, fd=%d, appid=%s)",
+                id, detail->_ico_uws_fd.fd, handler->appid.c_str());
         clearRecvCmdQueue(handler->appid);
         clearSendMsgQueue(handler->appid);
         delPollFd(handler);
index 8232668..1580c15 100644 (file)
@@ -63,8 +63,8 @@ CicoHSSwipeTouch::Initialize(CicoHSControlBarWindow* ctl_bar, CicoHSAppHistoryEx
     app_history = apphist;
     full_width = width;
     full_height = height;
-    ICO_DBG("Initialize: ctlbar=%08x apphist=%08x width=%d height=%d",
-            (int)ctl_bar, (int)apphist, width, height);
+    ICO_DBG("Initialize: ctlbar=%p apphist=%p width=%d height=%d",
+            (void *)ctl_bar, (void *)apphist, width, height);
 }
 
 /*--------------------------------------------------------------------------*/
index 47646ff..a623fe8 100644 (file)
@@ -242,12 +242,12 @@ CicoOSClient::receiveEventCB(const struct ico_uws_context* context,
 
     switch (event) {
     case ICO_UWS_EVT_CLOSE:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=%p)", id);
 //        ICO_TRA("CicoOSClient::receiveEventCB Leave");
         return;
     case ICO_UWS_EVT_ERROR:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=0x%08x, err=%d)", 
-                (int)id, detail->_ico_uws_error.code);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=%p, err=%d)",
+                id, detail->_ico_uws_error.code);
 //        ICO_TRA("CicoOSClient::receiveEventCB Leave");
         return;
     default:
@@ -261,25 +261,25 @@ CicoOSClient::receiveEventCB(const struct ico_uws_context* context,
 
     switch (event) {
     case ICO_UWS_EVT_OPEN:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_OPEN(id=0x%08x)", (int)id); 
+        ICO_DBG(">>>RECV ICO_UWS_EVT_OPEN(id=%p)", id);
         break;
     case ICO_UWS_EVT_CLOSE:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=%p)", id);
         break;
     case ICO_UWS_EVT_RECEIVE:
     {
-        ICO_DBG(">>>RECV ICO_UWS_EVT_RECEIVE(id=0x%08x, msg=%s, len=%d)", 
-                (int)id, (char *)detail->_ico_uws_message.recv_data,
+        ICO_DBG(">>>RECV ICO_UWS_EVT_RECEIVE(id=%p, msg=%s, len=%d)",
+                id, (char *)detail->_ico_uws_message.recv_data,
                 detail->_ico_uws_message.recv_len);
         break;
     }
     case ICO_UWS_EVT_ADD_FD:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=0x%08x, fd=%d)",
-                (int)id, detail->_ico_uws_fd.fd);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=%p, fd=%d)",
+                id, detail->_ico_uws_fd.fd);
         break;
     case ICO_UWS_EVT_DEL_FD:
-        ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=0x%08x, fd=%d)",
-                (int)id, detail->_ico_uws_fd.fd);
+        ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=%p, fd=%d)",
+                id, detail->_ico_uws_fd.fd);
         break;
     default:
         break;
index ecdec09..3c50f3b 100644 (file)
@@ -140,9 +140,9 @@ CicoOSPopWindow::showPopup()
 
     // Get icon path
     const char *icon = GetIconPath();
-    ICO_DBG("Received: %s : %i : %s : %s : %s : %x",
+    ICO_DBG("Received: %s : %i : %s : %s : %s : %p",
             pkgname, priv_id, title, content,
-            text, (int)service_handle);
+            text, (void *)service_handle);
 
     if (NULL != service_handle) {
         const char* pn = appsvc_get_pkgname(service_handle);