jackdanielz pushed a commit to branch master.

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

commit a660bbe966e1373eba02f8534e44abd115b8c387
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Fri Mar 7 18:02:44 2014 +0200

    Eolian: fix warnings
---
 src/lib/eolian/eo_lexer.c  | 7 +++++--
 src/lib/eolian/eo_lexer.rl | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 914395c..733091c 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -4207,6 +4207,9 @@ eo_tokenizer_database_fill(const char *filename)
    Eo_Event_Def *event;
    Eo_Implement_Def *impl;
 
+   FILE *stream = NULL;
+   char *buffer = NULL;
+
    Eo_Tokenizer *toknz = eo_tokenizer_get();
    if (!toknz)
      {
@@ -4214,14 +4217,14 @@ eo_tokenizer_database_fill(const char *filename)
         goto end;
      }
 
-   FILE *stream = fopen(filename, "rb");
+   stream = fopen(filename, "rb");
    if (!stream)
      {
         ERR("unable to read in %s", filename);
         goto end;
      }
 
-   char *buffer = malloc(BUFSIZE);
+   buffer = malloc(BUFSIZE);
    unsigned int len = fread(buffer, 1, BUFSIZE, stream);
 
    if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
diff --git a/src/lib/eolian/eo_lexer.rl b/src/lib/eolian/eo_lexer.rl
index 99dc4ef..f663ce3 100644
--- a/src/lib/eolian/eo_lexer.rl
+++ b/src/lib/eolian/eo_lexer.rl
@@ -1201,6 +1201,9 @@ eo_tokenizer_database_fill(const char *filename)
    Eo_Event_Def *event;
    Eo_Implement_Def *impl;
 
+   FILE *stream = NULL;
+   char *buffer = NULL;
+
    Eo_Tokenizer *toknz = eo_tokenizer_get();
    if (!toknz)
      {
@@ -1208,14 +1211,14 @@ eo_tokenizer_database_fill(const char *filename)
         goto end;
      }
 
-   FILE *stream = fopen(filename, "rb");
+   stream = fopen(filename, "rb");
    if (!stream)
      {
         ERR("unable to read in %s", filename);
         goto end;
      }
 
-   char *buffer = malloc(BUFSIZE);
+   buffer = malloc(BUFSIZE);
    unsigned int len = fread(buffer, 1, BUFSIZE, stream);
 
    if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;

-- 


Reply via email to