ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=7c8d84d110344574321ea55fa464023a0a7ee202

commit 7c8d84d110344574321ea55fa464023a0a7ee202
Author: Andy Williams <[email protected]>
Date:   Sun Feb 8 00:55:51 2015 +0000

    Fix a few warnings and possible build issues
---
 elm_code/tests/Makefile.am           | 2 +-
 elm_code/tests/elm_code_test_basic.c | 2 +-
 src/bin/edi_consolepanel.c           | 2 +-
 src/bin/editor/edi_editor.c          | 2 +-
 src/lib/edi_create.c                 | 6 +++---
 src/tests/Makefile.am                | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/elm_code/tests/Makefile.am b/elm_code/tests/Makefile.am
index 750d1a3..af4ae1a 100644
--- a/elm_code/tests/Makefile.am
+++ b/elm_code/tests/Makefile.am
@@ -24,7 +24,7 @@ elm_code_suite_CPPFLAGS = -I$(top_builddir)/elm_code/lib/ \
 @EFL_CFLAGS@ \
 @CHECK_CFLAGS@
 
-elm_code_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/elm_code/lib/libelm_code.la
+elm_code_suite_LDADD = @EFL_LIBS@ @CHECK_LIBS@ 
$(top_builddir)/elm_code/lib/libelm_code.la
 elm_code_suite_DEPENDENCIES = $(top_builddir)/elm_code/lib/libelm_code.la
 
 testdir = $(PACKAGE_TESTS_DIR)
diff --git a/elm_code/tests/elm_code_test_basic.c 
b/elm_code/tests/elm_code_test_basic.c
index 81a34bb..aabff68 100644
--- a/elm_code/tests/elm_code_test_basic.c
+++ b/elm_code/tests/elm_code_test_basic.c
@@ -12,7 +12,7 @@ START_TEST (elm_code_create_test)
    code = elm_code_create();
    elm_code_file_open(code, path);
 
-   ck_assert(code);
+   ck_assert(!!code);
    elm_code_free(code);
 }
 END_TEST
diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c
index a1a5a02..f01b4ed 100644
--- a/src/bin/edi_consolepanel.c
+++ b/src/bin/edi_consolepanel.c
@@ -95,7 +95,7 @@ _edi_consolepanel_clicked_cb(void *data, Eo *obj EINA_UNUSED,
    content = elm_code_file_line_content_get(code->file, line->number, &length);
 
    terminated = malloc(sizeof(char) * (length + 1));
-   snprintf(terminated, length, content);
+   snprintf(terminated, length, "%s", content);
 
    if (_edi_consolepanel_startswith_location(terminated))
      {
diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 947c740..13f593b 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -621,7 +621,7 @@ _edi_clang_setup(void *data)
 
    /* Clang */
    /* FIXME: index should probably be global. */
-   const char const *clang_argv[] = {"-I/usr/lib/clang/3.1/include/", "-Wall", 
"-Wextra"};
+   const char *clang_argv[] = {"-I/usr/lib/clang/3.1/include/", "-Wall", 
"-Wextra"};
    int clang_argc = sizeof(clang_argv) / sizeof(*clang_argv);
 
    editor->idx = clang_createIndex(0, 0);
diff --git a/src/lib/edi_create.c b/src/lib/edi_create.c
index 40ef9c5..422f5b3 100644
--- a/src/lib/edi_create.c
+++ b/src/lib/edi_create.c
@@ -21,9 +21,9 @@ _edi_create_filter_variable(const char *text, const char 
*variable, const char *
    copylen = pos - text;
    ret = malloc(sizeof(char) * (strlen(text) + strlen(value) - 
strlen(variable) + 1));
 
-   snprintf(ret, copylen + 1, text);
-   snprintf(ret + copylen, strlen(value) + 1, value);
-   snprintf(ret + copylen + strlen(value), strlen(text) - copylen - 
strlen(variable) + 1, text + copylen + strlen(variable));
+   snprintf(ret, copylen + 1, "%s", text);
+   snprintf(ret + copylen, strlen(value) + 1, "%s", value);
+   snprintf(ret + copylen + strlen(value), strlen(text) - copylen - 
strlen(variable) + 1, "%s", text + copylen + strlen(variable));
 
    return ret;
 }
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 9d7856c..eb836f5 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -20,7 +20,7 @@ edi_suite_CPPFLAGS = -I$(top_builddir)/src/lib/ 
-I$(top_builddir)/src/bin/ \
 @EFL_CFLAGS@ \
 @CHECK_CFLAGS@
 
-edi_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libedi.la 
$(top_builddir)/elm_code/lib/libelm_code.la
+edi_suite_LDADD = @EFL_LIBS@ @CHECK_LIBS@ $(top_builddir)/src/lib/libedi.la 
$(top_builddir)/elm_code/lib/libelm_code.la
 edi_suite_DEPENDENCIES = $(top_builddir)/src/lib/libedi.la 
$(top_builddir)/elm_code/lib/libelm_code.la
 
 endif

-- 


Reply via email to