Evas font: Fixed a clang error and gcc compiler warnings.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 9 Nov 2011 07:30:34 +0000 (07:30 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 9 Nov 2011 07:30:34 +0000 (07:30 +0000)
http://dev.enlightenment.fr/~discomfitor/evas-2011-11-08/report-SsIayB.html#EndPath

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@64975 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_default_walk.x
src/lib/engines/common/evas_font_draw.c

index 56807b8..94e7fde 100644 (file)
@@ -24,6 +24,7 @@
 #define _EVAS_FONT_WALK_TEXT_START() \
         Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \
            text_props->info->ot + text_props->start : NULL; \
+        if (!_ot_itr) break; \
         for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++, _ot_itr++) \
           {
 #else
@@ -48,6 +49,7 @@
      { \
         Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \
            text_props->info->glyph + text_props->start : NULL; \
+        if (!_glyph_itr) break; \
         _EVAS_FONT_WALK_TEXT_START()
 
 /*FIXME: doc */
index d00bc9a..14c6dc5 100644 (file)
@@ -93,7 +93,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
                                int ext_h, int im_w, int im_h __UNUSED__)
 {
    DATA32 *im;
-   FT_Face pface = NULL;
    RGBA_Font_Int *fi;
    EVAS_FONT_WALK_TEXT_INIT();
 
@@ -209,7 +208,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
      {
         FT_UInt idx;
         RGBA_Font_Glyph *fg;
-        int chr_x, chr_y, chr_w;
+        int chr_x, chr_y;
 
         if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
 
@@ -223,7 +222,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
              continue;
           }
 
-        pface = fi->src->ft.face;
         LKU(fi->ft_mutex);
 
         if (dc->font_ext.func.gl_new)
@@ -235,7 +233,6 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
 
         chr_x = x + EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR;
         chr_y = y + EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR;
-        chr_w = EVAS_FONT_WALK_WIDTH;
 
         if (chr_x < (ext_x + ext_w))
           {