From d401fdfb40d4423234a9589d0e428676ba667954 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sun, 30 Sep 2018 14:31:53 +0200 Subject: [PATCH] Fix Gcc Warning: /libresapi/src/api/RsControlModule.cpp:588: warning: no return statement in function returning non-void [-Wreturn-type] --- libresapi/src/api/RsControlModule.cpp | 6 +++--- libresapi/src/api/RsControlModule.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libresapi/src/api/RsControlModule.cpp b/libresapi/src/api/RsControlModule.cpp index 66ea7caf6..debd3ce34 100644 --- a/libresapi/src/api/RsControlModule.cpp +++ b/libresapi/src/api/RsControlModule.cpp @@ -486,7 +486,7 @@ void RsControlModule::handleCreateLocation(Request &req, Response &resp) resp.setFail("hidden_port out of range. It must fit into uint16!"); return; } - hidden_port = p; + hidden_port = static_cast(p); } RsPgpId pgp_id; @@ -527,7 +527,7 @@ void RsControlModule::handleCreateLocation(Request &req, Response &resp) RsInit::SetHiddenLocation(hidden_address, hidden_port, false); } - std::string ssl_password = RSRandom::random_alphaNumericString(RsInit::getSslPwdLen()) ; + std::string ssl_password = RSRandom::random_alphaNumericString(static_cast(RsInit::getSslPwdLen())) ; /* GenerateSSLCertificate - selects the PGP Account */ //RsInit::SelectGPGAccount(PGPId); @@ -581,7 +581,7 @@ bool RsControlModule::askForDeferredSelfSignature(const void *data, const uint32 } } -bool RsControlModule::requestShutdown() +void RsControlModule::requestShutdown() { RS_STACK_MUTEX(mExitFlagMtx); mProcessShouldExit = true; diff --git a/libresapi/src/api/RsControlModule.h b/libresapi/src/api/RsControlModule.h index e9886f7bc..587a753a3 100644 --- a/libresapi/src/api/RsControlModule.h +++ b/libresapi/src/api/RsControlModule.h @@ -50,7 +50,7 @@ public: // full_control: set to true if this module should handle rsinit and login // set to false if rsinit is handled by the Qt gui RsControlModule(int argc, char **argv, StateTokenServer* sts, ApiServer* apiserver, bool full_control); - ~RsControlModule(); + ~RsControlModule() override; // returns true if the process should terminate bool processShouldExit(); @@ -62,12 +62,12 @@ public: virtual bool askForPassword(const std::string &title, const std::string& key_details, bool prev_is_bad , std::string& password,bool& canceled) override; virtual bool askForDeferredSelfSignature(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen,int& signature_result, std::string reason = "") override; - virtual bool requestShutdown(); + virtual void requestShutdown(); protected: // from RsThread // wee need a thread to call into things which block like askForPassword() - virtual void run(); + virtual void run() override; private: void handleRunState(Request& req, Response& resp);