diff --git a/include/opendht/dht_proxy_client.h b/include/opendht/dht_proxy_client.h index aacc2fca6c21b12fe343b509c8421ff1ce145de6..f7a3b47c300fc4bc83a75daa491621a82307171e 100644 --- a/include/opendht/dht_proxy_client.h +++ b/include/opendht/dht_proxy_client.h @@ -49,6 +49,8 @@ public: virtual void setPushNotificationToken(const std::string& token) { #ifdef OPENDHT_PUSH_NOTIFICATIONS deviceKey_ = token; +#else + (void) token; #endif } diff --git a/src/dht_proxy_client.cpp b/src/dht_proxy_client.cpp index eb36df6367741ef841efeb5aa847921bd0292fdb..1c8f0b371961586e3e35b2d164cf389b8e1ece87 100644 --- a/src/dht_proxy_client.cpp +++ b/src/dht_proxy_client.cpp @@ -1037,6 +1037,8 @@ DhtProxyClient::pushNotificationReceived(const std::map<std::string, std::string } catch (const std::exception& e) { DHT_LOG.e("Error handling push notification: %s", e.what()); } +#else + (void) notification; #endif } @@ -1066,6 +1068,9 @@ DhtProxyClient::resubscribe(const InfoHash& key, Listener& listener) listener.thread = std::thread([this, req, vcb, filter, state]() { sendListen(req, vcb, filter, state, ListenMethod::RESUBSCRIBE); }); +#else + (void) key; + (void) listener; #endif } diff --git a/src/dhtrunner.cpp b/src/dhtrunner.cpp index e6a4af350c3865aa24de198ac5446a969a9d6ef7..9356276ce6604a67dc3265a41733df5e20d7acd9 100644 --- a/src/dhtrunner.cpp +++ b/src/dhtrunner.cpp @@ -1077,6 +1077,8 @@ DhtRunner::forwardAllMessages(bool forward) #endif // OPENDHT_PROXY_CLIENT if (dht_) dht_->forwardAllMessages(forward); +#else + (void) forward; #endif // OPENDHT_PROXY_SERVER } @@ -1089,6 +1091,8 @@ DhtRunner::setPushNotificationToken(const std::string& token) { pushToken_ = token; if (dht_via_proxy_) dht_via_proxy_->setPushNotificationToken(token); +#else + (void) token; #endif } @@ -1104,6 +1108,8 @@ DhtRunner::pushNotificationReceived(const std::map<std::string, std::string>& da }); } cv.notify_all(); +#else + (void) data; #endif }