Fix a few warnings and possible build issues

This commit is contained in:
Andy Williams 2015-02-08 00:55:51 +00:00
parent d648b31713
commit 7c8d84d110
6 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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

View File

@ -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))
{

View File

@ -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);

View File

@ -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;
}

View File

@ -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