mark unused attributes
This commit is contained in:
+8
-2
@@ -22,6 +22,12 @@
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
#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
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user