From 61cc61817ef8828cb95cebb4adeefbba00ed6f7c Mon Sep 17 00:00:00 2001 From: Jesse Engle Date: Mon, 17 Jul 2017 04:16:00 +0000 Subject: [PATCH] Subject: Eliminated 'unused variable' compiler warning generated with -DLWS_WITH_NO_LOGS=ON. The unused variable was only declared for use in a log macro that's compiled out with the above compiler switch. I removed the declaration and casted the variable at each use in the block. AG: convert to void case reference irrespective of logging enabled. AG: travis.yml: add -DLWS_WITH_NO_LOGS=ON that also enables lwsws + cgi code --- .travis.yml | 1 + lib/context.c | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0bc3c12..55cb766 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ env: - LWS_METHOD=nossl CMAKE_ARGS="-DLWS_WITH_SSL=OFF" - LWS_METHOD=nodaemon CMAKE_ARGS="-DLWS_WITHOUT_DAEMONIZE=ON" - LWS_METHOD=cgi CMAKE_ARGS="-DLWS_WITH_CGI=ON" + - LWS_METHOD=nologs CMAKE_ARGS="-DLWS_WITH_NO_LOGS=ON" os: - linux diff --git a/lib/context.c b/lib/context.c index 666f51e..f3b56ce 100644 --- a/lib/context.c +++ b/lib/context.c @@ -386,6 +386,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason, { struct lws_ssl_info *si = in; + (void)si; lwsl_notice("LWS_CALLBACK_SSL_INFO: where: 0x%x, ret: 0x%x\n", si->where, si->ret); } -- 2.7.4