fix build warning 86/58186/1
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 28 Jan 2016 07:52:50 +0000 (16:52 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 28 Jan 2016 07:52:50 +0000 (16:52 +0900)
Change-Id: I207f705c1ecc8ad3625780161085810cc8e0aca6

src/bin/e_client.c
src/bin/e_comp.c
src/bin/e_comp_wl.c
src/bin/e_comp_wl_input.c
src/bin/e_desk.c
src/bin/e_log.h
src/bin/e_mouse.c
src/bin/e_pixmap.c
src/modules/wl_desktop_shell/e_mod_main.c

index 8eb5f24bbd0a0a0094638222d7205d68024b2e75..2edc72ca251ef3f65179164f0bc4858ae094ff6f 100644 (file)
@@ -5700,8 +5700,7 @@ e_client_has_xwindow(const E_Client *ec)
 #ifdef HAVE_WAYLAND_ONLY
    (void)ec;
    return EINA_FALSE;
-#endif
-#ifdef HAVE_WAYLAND
+#elif HAVE_WAYLAND
    if (!e_pixmap_is_x(ec->pixmap))
      return !!e_comp_wl_client_xwayland_pixmap(ec);
 #endif
index 8cfd89ac9fa99640a0981544b23090d522a3c11c..0c76f2de3c44ab23b2fbc553514d87de019d36dd 100644 (file)
@@ -749,7 +749,6 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED)
    Eina_Iterator *ti;
    Eina_Rectangle *exr;
    unsigned int i, tile_count;
-   Ecore_Window win;
 #ifdef SHAPE_DEBUG
    Eina_Rectangle *r;
    Eina_List *rl = NULL;
@@ -758,10 +757,13 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED)
    INF("---------------------");
 #endif
 
+#ifndef HAVE_WAYLAND_ONLY
+   Ecore_Window win;
    if (e_comp->comp_type == E_PIXMAP_TYPE_X)
      win = e_comp->win;
    else
      win = e_comp->cm_selection;
+#endif
    E_FREE_LIST(e_comp->debug_rects, evas_object_del);
    tb = eina_tiler_new(e_comp->w, e_comp->h);
    EINA_SAFETY_ON_NULL_GOTO(tb, tb_fail);
@@ -1404,9 +1406,6 @@ e_comp_shutdown(void)
    Eina_List *l, *ll;
    E_Client *ec;
 
-#ifdef HAVE_WAYLAND
-   E_Pixmap_Type type = e_comp->comp_type;
-#endif
    E_FREE_FUNC(action_timeout, ecore_timer_del);
    EINA_LIST_FOREACH_SAFE(e_comp->clients, l, ll, ec)
      {
index f2097169ab9a326a07fae2c008fb780312fd5a31..2a629625bc13191a375153fc9ec644673ad0951c 100644 (file)
@@ -964,8 +964,6 @@ _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
 {
    E_Client *ec;
    Evas_Event_Mouse_Move *ev;
-   struct wl_resource *res;
-   Eina_List *l;
    Evas_Device *dev = NULL;
 
    ev = event;
@@ -1004,56 +1002,6 @@ _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
      }
 }
 
-static Eina_Bool
-_e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state)
-{
-   Eina_List *l;
-   struct wl_client *wc;
-   uint32_t serial, btn;
-   struct wl_resource *res;
-
-   if (ec->cur_mouse_action || ec->border_menu) return EINA_FALSE;
-   if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
-   if (e_client_util_ignored_get(ec)) return EINA_FALSE;
-
-   switch (button_id)
-     {
-      case 1:
-        btn = BTN_LEFT;
-        break;
-      case 2:
-        btn = BTN_MIDDLE;
-        break;
-      case 3:
-        btn = BTN_RIGHT;
-        break;
-      default:
-        btn = button_id;
-        break;
-     }
-
-   e_comp_wl->ptr.button = btn;
-
-   if (!ec->comp_data->surface) return EINA_FALSE;
-
-   if ((ec->comp_data->transform.cur_degree != 0) &&
-       (btn == BTN_MIDDLE))
-     {
-        _e_comp_wl_transform_unset(ec);
-        return EINA_TRUE;
-     }
-
-   wc = wl_resource_get_client(ec->comp_data->surface);
-   serial = wl_display_next_serial(e_comp_wl->wl.disp);
-
-   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
-     {
-        if (wl_resource_get_client(res) != wc) continue;
-        if (!e_comp_wl_input_pointer_check(res)) continue;
-        wl_pointer_send_button(res, serial, timestamp, btn, state);
-     }
-}
-
 static void
 _e_comp_wl_evas_handle_mouse_button_to_touch(E_Client *ec, uint32_t timestamp, int canvas_x, int canvas_y, Eina_Bool flag)
 {
@@ -1930,7 +1878,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
    Eina_Bool first = EINA_FALSE;
    Eina_Rectangle *dmg;
    Eina_Bool ignored, placed = EINA_TRUE;
-   int x = 0, y = 0, w, h;
+   int x = 0, y = 0;
    E_Comp_Wl_Buffer *buffer;
 
    first = !e_pixmap_usable_get(ec->pixmap);
@@ -2463,8 +2411,7 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso
 {
    struct wl_resource *res;
    E_Pixmap *ep = NULL;
-   E_Client *wc, *ec = NULL;
-   Eina_List *l;
+   E_Client *ec = NULL;
    pid_t pid;
    int internal = 0;
 
@@ -2747,7 +2694,7 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED,
         return;
      }
 
-   wl_resource_set_implementation(res, &_e_comp_interface, e_comp, NULL);
+   wl_resource_set_implementation(res, &_e_comp_interface, e_comp, _e_comp_wl_compositor_cb_unbind);
 
    wl_client_get_credentials(client, &pid, &uid, &gid);
 
@@ -3559,25 +3506,6 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
    _e_comp_wl_focus_check();
 }
 
-static void
-_e_comp_wl_client_cb_post_new(void *data EINA_UNUSED, E_Client *ec)
-{
-   if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
-   if (e_object_is_del(E_OBJECT(ec))) return;
-
-   ec->need_shape_merge = EINA_FALSE;
-
-   if (ec->need_shape_export)
-     {
-//        ec->shape_changed = EINA_TRUE;
-        e_comp_shape_queue();
-        ec->need_shape_export = EINA_FALSE;
-     }
-
-   if (ec->argb && ec->frame && !e_util_strcmp("video", ec->icccm.window_role))
-     _e_comp_wl_subsurface_create_below_bg_rectangle(ec);
-}
-
 #if 0
 static void
 _e_comp_wl_client_cb_pre_frame(void *data EINA_UNUSED, E_Client *ec)
@@ -3849,7 +3777,7 @@ _e_comp_wl_cb_output_bind(struct wl_client *client, void *data, uint32_t version
 }
 
 static void
-_e_comp_wl_gl_init(void)
+_e_comp_wl_gl_init(void *data EINA_UNUSED)
 {
    Evas_GL *evasgl = NULL;
    Evas_GL_API *glapi = NULL;
@@ -4071,7 +3999,7 @@ _e_comp_wl_compositor_create(void)
         goto input_err;
      }
 
-   _e_comp_wl_gl_init();
+   _e_comp_wl_gl_init(NULL);
 
 #ifndef HAVE_WAYLAND_ONLY
    if (e_comp_util_has_x())
index fc2bc78d2d2588408d1689e6721078e94039e7e6..3c588eb1791556da06105929fdb0688352cb7aac 100644 (file)
@@ -199,10 +199,6 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
 {
    E_Client *focused;
    struct wl_resource *res;
-   E_Client *ec;
-   struct wl_client *wc;
-   uint32_t serial, *k;
-   Eina_List *l;
 
    /* try to create keyboard resource */
    res = wl_resource_create(client, &wl_keyboard_interface,
index f75636f74806bcf3f7e3bb38f5f5fe7a98565575..32609d11022c2a5fd38d68a4620e271d2acc650c 100644 (file)
@@ -217,7 +217,7 @@ e_desk_show(E_Desk *desk)
    Eina_List *l;
    E_Shelf *es;
    E_Desk *desk2;
-   int x, y, dx = 0, dy = 0;
+   int dx = 0, dy = 0;
 
    E_OBJECT_CHECK(desk);
    E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
index 5d47348e6b41465472713d57ede550abb16ca391..37a3b52072f91342b01e5a7615d1a314b5cd0b1d 100644 (file)
@@ -47,7 +47,7 @@
    while (0)
 
 
-extern E_API int e_log_dom;
+EINTERN extern int e_log_dom;
 
 EINTERN int e_log_init(void);
 EINTERN int e_log_shutdown(void);
index 7579a368867e4dcee6d6d7b669a45c3733cc497e..ac90d7415a141d44993f46c898f1b866f43cd070 100644 (file)
@@ -47,7 +47,7 @@ e_mouse_update(void)
 #ifdef HAVE_WL_DRM
    if (strstr(ecore_evas_engine_name_get(e_comp->ee), "drm"))
      {
-        Eina_List *list, *l;
+        const Eina_List *list, *l;
         Ecore_Drm_Device *dev;
 
         list = ecore_drm_devices_get();
index b19b72fa63e8cb6681198a5a4d1ea8a7f9113438..09e1d312cf364e2b4d6e593104be0ab490963e5e 100644 (file)
@@ -408,6 +408,9 @@ e_pixmap_parent_window_set(E_Pixmap *cp, Ecore_Window win)
          e_pixmap_clear(cp);
 #endif
          break;
+      default:
+         ERR("Unkown pixmap type:%d", cp->type);
+         break;
      }
 
    cp->parent = win;
@@ -864,7 +867,7 @@ e_pixmap_image_refresh(E_Pixmap *cp)
            cp->w = cp->h = 0;
            cp->image_argb = EINA_FALSE;
 
-           if (!buffer) return;
+           if (!buffer) return EINA_FALSE;
 
            if (buffer->type == E_COMP_WL_BUFFER_TYPE_SHM)
              {
@@ -873,7 +876,7 @@ e_pixmap_image_refresh(E_Pixmap *cp)
                   {
                      ERR("No shm_buffer resource:%u", wl_resource_get_id(buffer->resource));
                      e_comp_wl_buffer_reference(&cp->buffer_ref, NULL);
-                     return;
+                     return EINA_FALSE;
                   }
 
                 buffer->shm_buffer = shm_buffer;
@@ -914,7 +917,7 @@ e_pixmap_image_refresh(E_Pixmap *cp)
                   {
                      ERR("Invalid native buffer resource:%u", wl_resource_get_id(buffer->resource));
                      e_comp_wl_buffer_reference(&cp->buffer_ref, NULL);
-                     return;
+                     return EINA_FALSE;
                   }
 
              }
@@ -947,7 +950,7 @@ e_pixmap_image_refresh(E_Pixmap *cp)
              {
                 ERR("Invalid resource:%u", wl_resource_get_id(buffer->resource));
                 e_comp_wl_buffer_reference(&cp->buffer_ref, NULL);
-                return;
+                return EINA_FALSE;
              }
 
            cp->buffer_destroy_listener.notify = _e_pixmap_cb_buffer_destroy;
index 2d6e192c8e8117a670f6d0b004647f46085814c7..717c9a1d007841c6f539522a6984faa8c3ae669d 100644 (file)
@@ -187,7 +187,6 @@ _e_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resou
 {
    E_Client *ec;
    E_Binding_Event_Mouse_Button ev;
-   int cx, cy;
 
    /* get the client for this resource */
    if (!(ec = wl_resource_get_user_data(resource)))
@@ -797,7 +796,6 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r
 {
    E_Client *ec;
    E_Binding_Event_Mouse_Button ev;
-   int cx, cy;
 
    /* DBG("XDG_SHELL: Surface Resize: %d\tEdges: %d",  */
    /*     wl_resource_get_id(resource), edges); */