diff --git a/src/lib/knx/knx.h b/src/lib/knx/knx.h index 981cc642..ea376fde 100644 --- a/src/lib/knx/knx.h +++ b/src/lib/knx/knx.h @@ -22,6 +22,12 @@ #include #include +#if defined(__GNUC__) +#define MAYBE_UNUSED __attribute__((unused)) +#else +#define MAYBE_UNUSED +#endif + namespace ebusd { /** @file lib/knx/knx.h @@ -160,7 +166,7 @@ class KnxConnection { /** * @param address the individual address to set. */ - virtual void setAddress(knx_addr_t address) { + virtual void setAddress(MAYBE_UNUSED knx_addr_t address) { // default implementation does nothing } @@ -176,7 +182,7 @@ class KnxConnection { * Set the programming mode. * @param on true to start programming mode, false to stop it. */ - virtual void setProgrammingMode(bool on) { + virtual void setProgrammingMode(MAYBE_UNUSED bool on) { // default implementation does nothing } }; diff --git a/src/lib/utils/httpclient.cpp b/src/lib/utils/httpclient.cpp index 8a369c93..48b9f661 100755 --- a/src/lib/utils/httpclient.cpp +++ b/src/lib/utils/httpclient.cpp @@ -28,6 +28,12 @@ #endif // HAVE_SSL #include "lib/utils/log.h" +#if defined(__GNUC__) +#define MAYBE_UNUSED __attribute__((unused)) +#else +#define MAYBE_UNUSED +#endif + namespace ebusd { using std::string; @@ -171,7 +177,7 @@ void sslInfoCallback(const SSL *ssl, int type, int val) { (type & SSL_CB_ALERT) ? SSL_alert_desc_string_long(val) : "?"); } -int bioInfoCallback(BIO *bio, int state, int res) { +int bioInfoCallback(MAYBE_UNUSED BIO *bio, int state, int res) { logDebug(lf_network, "SSL BIO state %d res %d", state,