raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9d3391e35085d1477003493f796337e6e22ddf4f

commit 9d3391e35085d1477003493f796337e6e22ddf4f
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Mar 1 13:19:08 2016 +0900

    edje entry: fix gcc warnings about possibly uninitialized variables
    
    this fixes warnings from gcc specifically:
    
    lib/edje/edje_entry.c: In function ‘_edje_entry_imf_cursor_info_set’:
    lib/edje/edje_entry.c:4104:4: warning: ‘dir’ may be used uninitialized
    in this function [-Wmaybe-uninitialized]
        ecore_imf_context_bidi_direction_set(en->imf_context,
    (Ecore_IMF_BiDi_Direction)dir);
        ^
        lib/edje/edje_entry.c:4099:24: note: ‘dir’ was declared here
            Evas_BiDi_Direction dir;
                                    ^
                                    lib/edje/edje_entry.c:4103:4: warning:
    ‘ch’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:27: note: ‘ch’ was declared here
            Evas_Coord cx, cy, cw, ch;
                                       ^
                                       lib/edje/edje_entry.c:4103:4:
    warning: ‘cw’ may be used uninitialized in this function
    [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:23: note: ‘cw’ was declared here
            Evas_Coord cx, cy, cw, ch;
                                   ^
                                   lib/edje/edje_entry.c:4103:4: warning:
    ‘cy’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:19: note: ‘cy’ was declared here
            Evas_Coord cx, cy, cw, ch;
                               ^
                               lib/edje/edje_entry.c:4103:4: warning:
    ‘cx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:15: note: ‘cx’ was declared here
            Evas_Coord cx, cy, cw, ch;
                           ^
                           lib/edje/edje_entry.c: In function
    ‘_edje_part_move_cb’:
    lib/edje/edje_entry.c:4104:4: warning: ‘dir’ may be used uninitialized
    in this function [-Wmaybe-uninitialized]
        ecore_imf_context_bidi_direction_set(en->imf_context,
    (Ecore_IMF_BiDi_Direction)dir);
        ^
        lib/edje/edje_entry.c:4099:24: note: ‘dir’ was declared here
            Evas_BiDi_Direction dir;
                                    ^
                                    lib/edje/edje_entry.c:4103:4: warning:
    ‘ch’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:27: note: ‘ch’ was declared here
            Evas_Coord cx, cy, cw, ch;
                                       ^
                                       lib/edje/edje_entry.c:4103:4:
    warning: ‘cw’ may be used uninitialized in this function
    [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:23: note: ‘cw’ was declared here
            Evas_Coord cx, cy, cw, ch;
                                   ^
                                   lib/edje/edje_entry.c:4103:4: warning:
    ‘cy’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:19: note: ‘cy’ was declared here
            Evas_Coord cx, cy, cw, ch;
                               ^
                               lib/edje/edje_entry.c:4103:4: warning:
    ‘cx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw,
    ch);
        ^
        lib/edje/edje_entry.c:4098:15: note: ‘cx’ was declared here
            Evas_Coord cx, cy, cw, ch;
                           ^
    
    and the likes...
---
 src/lib/edje/edje_entry.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 34f98a0..c724d9d 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -4095,8 +4095,8 @@ static void
 _edje_entry_imf_cursor_location_set(Entry *en)
 {
 #ifdef HAVE_ECORE_IMF
-   Evas_Coord cx, cy, cw, ch;
-   Evas_BiDi_Direction dir;
+   Evas_Coord cx = 0, cy = 0, cw = 0, ch = 0;
+   Evas_BiDi_Direction dir = 0;
    if (!en || !en->rp || !en->imf_context) return;
 
    _edje_entry_cursor_geometry_get(en->rp, &cx, &cy, &cw, &ch, &dir);

-- 


Reply via email to