If we want Travis CI to fail on warnings (#29), simply add the -Werror C_FLAG to the .travis.yml. However, in doing this, the build will fail because we have several warnings already.
Here are all the warnings as of the creation of this issue. Once they are fixed, add the -Werror flag and we should be good from there.
GCC & Clang
/home/travis/build/ECP-VeloC/AXL/src/axl.c:359:15: warning: unused variable ‘source’ [-Wunused-variable]
char* source = kvtree_elem_key(elem);
^
⋮
/home/travis/build/ECP-VeloC/AXL/src/axl_async_daemon.c:338:11: warning: unused variable ‘map’ [-Wunused-variable]
kvtree* map = axl_file_lists;
^
/home/travis/build/ECP-VeloC/AXL/src/axl_async_daemon.c: In function ‘axl_async_wait_daemon’:
/home/travis/build/ECP-VeloC/AXL/src/axl_async_daemon.c:410:11: warning: unused variable ‘map’ [-Wunused-variable]
kvtree* map = axl_file_lists;
^
⋮
/home/travis/build/ECP-VeloC/AXL/src/axl_async_bbapi.c:65:12: warning: ‘axl_get_unique_node_id’ defined but not used [-Wunused-function]
static int axl_get_unique_node_id(int *id)
^
⋮
/home/travis/build/ECP-VeloC/AXL/test/test_axl.c:179:17: warning: too many arguments for format [-Wformat-extra-args]
test_rc[i] == 0 ? "PASSED" : "FAILED", test_rc[i]);
^
Clang 4
/home/travis/build/ECP-VeloC/AXL/src/axld.c:843:22: warning: comparison of
unsigned expression < 0 is always false [-Wtautological-compare]
if (nwrite < 0) {
~~~~~~ ^ ~
⋮
/home/travis/build/ECP-VeloC/AXL/test/test_axl.c:50:17: warning: comparison of
unsigned expression < 0 is always false [-Wtautological-compare]
if (rc1 < 0) {
~~~ ^ ~
/home/travis/build/ECP-VeloC/AXL/test/test_axl.c:55:17: warning: comparison of
unsigned expression < 0 is always false [-Wtautological-compare]
if (rc2 < 0) {
~~~ ^ ~
I have a patch waiting in the wings that will fix the AXL compiler errors. I'm waiting on #47 to go in first though, as the daemon's removal will get rid of some of the errors.
If we want Travis CI to fail on warnings (#29), simply add the
-Werror
C_FLAG to the .travis.yml. However, in doing this, the build will fail because we have several warnings already.Here are all the warnings as of the creation of this issue. Once they are fixed, add the
-Werror
flag and we should be good from there.GCC & Clang
Clang 4