* edje: less warnings by Albin Tonnerre.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 17 Aug 2010 12:15:04 +0000 (12:15 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 17 Aug 2010 12:15:04 +0000 (12:15 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@51249 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_edit.c
src/lib/edje_entry.c
src/lib/edje_lua2.c
src/lib/edje_util.c

index 7b09262..721f4bf 100644 (file)
@@ -5415,9 +5415,9 @@ edje_edit_script_get(Evas_Object *obj)
 #define BUF_APPENDF(FMT, ...) \
    ret &= eina_strbuf_append_printf(buf, FMT, ##__VA_ARGS__)
 
-static char *types[] = {"NONE", "RECT", "TEXT", "IMAGE", "SWALLOW", "TEXTBLOCK", "GRADIENT", "GROUP", "BOX", "TABLE", "EXTERNAL"};
-static char *effects[] = {"NONE", "PLAIN", "OUTLINE", "SOFT_OUTLINE", "SHADOW", "SOFT_SHADOW", "OUTLINE_SHADOW", "OUTLINE_SOFT_SHADOW ", "FAR_SHADOW ", "FAR_SOFT_SHADOW", "GLOW"};
-static char *prefers[] = {"NONE", "VERTICAL", "HORIZONTAL", "BOTH"};
+static const char *types[] = {"NONE", "RECT", "TEXT", "IMAGE", "SWALLOW", "TEXTBLOCK", "GRADIENT", "GROUP", "BOX", "TABLE", "EXTERNAL"};
+static const char *effects[] = {"NONE", "PLAIN", "OUTLINE", "SOFT_OUTLINE", "SHADOW", "SOFT_SHADOW", "OUTLINE_SHADOW", "OUTLINE_SOFT_SHADOW ", "FAR_SHADOW ", "FAR_SOFT_SHADOW", "GLOW"};
+static const char *prefers[] = {"NONE", "VERTICAL", "HORIZONTAL", "BOTH"};
 
  static Eina_Bool
 _edje_generate_source_of_colorclass(Edje * ed, const char *name, Eina_Strbuf *buf)
index 43fff8e..23ffb14 100644 (file)
@@ -524,11 +524,11 @@ _edje_anchor_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UN
        len = 200 + strlen(n);
        buf = alloca(len);
         if (ev->flags & EVAS_BUTTON_TRIPLE_CLICK)
-          snprintf(buf, len, "anchor,mouse,down,%i,%s,triple", ev->button, an->name);
+          snprintf(buf, len, "anchor,mouse,down,%i,%s,triple", ev->button, n);
         else if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
-         snprintf(buf, len, "anchor,mouse,down,%i,%s,double", ev->button, an->name);
+         snprintf(buf, len, "anchor,mouse,down,%i,%s,double", ev->button, n);
        else
-         snprintf(buf, len, "anchor,mouse,down,%i,%s", ev->button, an->name);
+         snprintf(buf, len, "anchor,mouse,down,%i,%s", ev->button, n);
        _edje_emit(rp->edje, buf, rp->part->name);
      }
 }
@@ -555,7 +555,7 @@ _edje_anchor_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
        if (!n) n = "";
        len = 200 + strlen(n);
        buf = alloca(len);
-       snprintf(buf, len, "anchor,mouse,up,%i,%s", ev->button, an->name);
+       snprintf(buf, len, "anchor,mouse,up,%i,%s", ev->button, n);
        _edje_emit(rp->edje, buf, rp->part->name);
      }
 }
@@ -582,7 +582,7 @@ _edje_anchor_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UN
        if (!n) n = "";
        len = 200 + strlen(n);
        buf = alloca(len);
-       snprintf(buf, len, "anchor,mouse,move,%s", an->name);
+       snprintf(buf, len, "anchor,mouse,move,%s", n);
        _edje_emit(rp->edje, buf, rp->part->name);
      }
 }
@@ -604,7 +604,7 @@ _edje_anchor_mouse_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
        if (!n) n = "";
        len = 200 + strlen(n);
        buf = alloca(len);
-       snprintf(buf, len, "anchor,mouse,in,%s", an->name);
+       snprintf(buf, len, "anchor,mouse,in,%s", n);
        _edje_emit(rp->edje, buf, rp->part->name);
      }
 }
@@ -626,7 +626,7 @@ _edje_anchor_mouse_out_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
        if (!n) n = "";
        len = 200 + strlen(n);
        buf = alloca(len);
-       snprintf(buf, len, "anchor,mouse,out,%s", an->name);
+       snprintf(buf, len, "anchor,mouse,out,%s", n);
        _edje_emit(rp->edje, buf, rp->part->name);
      }
 }
index f851b98..01762c2 100644 (file)
@@ -446,7 +446,7 @@ _elua_alloc(void *ud, void *ptr, size_t osize, size_t nsize)
    
    ptr2 = realloc(ptr, nsize);
    if (ptr2) return ptr2;
-   ERR("Edje Lua cannot re-allocate %i bytes", nsize);
+   ERR("Edje Lua cannot re-allocate %zu bytes", nsize);
    return ptr2;
 }
 
@@ -463,7 +463,7 @@ void
 _edje_lua2_error_full(const char *file, const char *fnc, int line,
                       lua_State *L, int err_code)
 {
-   char *err_type;
+   const char *err_type;
    
    switch (err_code)
      {
index 445f838..676c46c 100644 (file)
@@ -2404,7 +2404,7 @@ _edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data,
    return EINA_TRUE;
 }
 
-void
+static void
 _edje_box_layout_external_free(Eina_Rbtree *node, __UNUSED__ void *data)
 {
    Edje_Box_Layout *l = (Edje_Box_Layout *)node;