diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3d435955..d3160f04 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,6 +77,14 @@ target_include_directories(paho-cpp-objs src ) +# --- Warnings --- + +# Maybe set '-Werror' for Release builds? +target_compile_options(paho-cpp-objs PRIVATE + $<$:/W3> + $<$:-Wall -Wextra -Wdocumentation> + $<$>:-Wall -Wextra> +) ## --- Build the shared library, if requested --- diff --git a/src/mqtt/client.h b/src/mqtt/client.h index 6900aed6..7b7d19c1 100644 --- a/src/mqtt/client.h +++ b/src/mqtt/client.h @@ -231,7 +231,7 @@ class client : private callback */ virtual topic get_topic(const string& top, int qos=message::DFLT_QOS, bool retained=message::DFLT_RETAINED) { - return topic(cli_, top); + return topic(cli_, top, qos, retained); } /** * Determines if this client is currently connected to the server. diff --git a/src/mqtt/server_response.h b/src/mqtt/server_response.h index a1118390..a97f3bdf 100644 --- a/src/mqtt/server_response.h +++ b/src/mqtt/server_response.h @@ -190,7 +190,7 @@ class unsubscribe_response : public server_response } } - unsubscribe_response(MQTTAsync_successData* rsp) {} + unsubscribe_response(MQTTAsync_successData* /*rsp*/) {} public: /**