From 5050d4f66a891702aabcadb82c4485e87c0300e9 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 11:42:49 +0200 Subject: [PATCH 01/16] =?UTF-8?q?Fix=20Warnings:=20unused=20parameter=20?= =?UTF-8?q?=E2=80=98indent=E2=80=99=20warning:=20unused=20parameter=20?= =?UTF-8?q?=E2=80=98indent=E2=80=99=20[-Wunused-parameter]=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20virtual=20std::ostream&=20print(std::ostream=20&?= =?UTF-8?q?out,=20uint16=5Ft=20indent=20=3D=200)=20{=20return=20out;=20}?= =?UTF-8?q?=20//=20derived=20from=20RsItem,=20but=20should=20be=20removed?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20^?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libretroshare/src/chat/rschatitems.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/chat/rschatitems.h b/libretroshare/src/chat/rschatitems.h index ddc0a2b86..ab511aab8 100644 --- a/libretroshare/src/chat/rschatitems.h +++ b/libretroshare/src/chat/rschatitems.h @@ -93,7 +93,7 @@ class RsChatItem: public RsItem } virtual ~RsChatItem() {} - virtual std::ostream& print(std::ostream &out, uint16_t indent = 0) { return out; } // derived from RsItem, but should be removed + virtual std::ostream& print(std::ostream &out, uint16_t /*indent*/ = 0) { return out; } // derived from RsItem, but should be removed virtual void clear() {} }; From dd089a96835ce23aebbcd0ff17e23b4bb5fee9a1 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 11:46:54 +0200 Subject: [PATCH 02/16] =?UTF-8?q?Fix=20Warnings:=20this=20=E2=80=98if?= =?UTF-8?q?=E2=80=99=20clause=20does=20not=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(service_id != RS_SERVICE_TYPE_CHAT) ^~ --- libretroshare/src/chat/rschatitems.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/chat/rschatitems.cc b/libretroshare/src/chat/rschatitems.cc index 2b7dd67d8..62d9065e7 100644 --- a/libretroshare/src/chat/rschatitems.cc +++ b/libretroshare/src/chat/rschatitems.cc @@ -39,8 +39,8 @@ static const uint32_t RS_CHAT_SERIALIZER_FLAGS_NO_SIGNATURE = 0x0001; RsItem *RsChatSerialiser::create_item(uint16_t service_id,uint8_t item_sub_id) const { - if(service_id != RS_SERVICE_TYPE_CHAT) - return NULL ; + if (service_id != RS_SERVICE_TYPE_CHAT) + return NULL; switch(item_sub_id) { From 381aca41971c1dec3f1717d3661d9a4b529aef6f Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 11:49:39 +0200 Subject: [PATCH 03/16] =?UTF-8?q?Fix=20Warnings:=20unused=20parameter=20?= =?UTF-8?q?=E2=80=98j=E2=80=99,=20'ctx'=20&=20'name'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: unused parameter ‘j’ [-Wunused-parameter] void RsChatLobbyListRequestItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx) ^ --- libretroshare/src/chat/rschatitems.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/chat/rschatitems.cc b/libretroshare/src/chat/rschatitems.cc index 62d9065e7..dc46b759f 100644 --- a/libretroshare/src/chat/rschatitems.cc +++ b/libretroshare/src/chat/rschatitems.cc @@ -97,12 +97,12 @@ void RsChatLobbyMsgItem::serial_process(RsGenericSerializer::SerializeJob j,RsGe RsChatLobbyBouncingObject::serial_process(j,ctx) ; } -void RsChatLobbyListRequestItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx) +void RsChatLobbyListRequestItem::serial_process(RsGenericSerializer::SerializeJob /*j*/,RsGenericSerializer::SerializeContext& /*ctx*/) { // nothing to do. This is an empty item. } -template<> void RsTypeSerializer::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx,VisibleChatLobbyInfo& info,const std::string& name) +template<> void RsTypeSerializer::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx,VisibleChatLobbyInfo& info,const std::string& /*name*/) { RsTypeSerializer::serial_process(j,ctx,info.id,"info.id") ; From 7892004641aa2565ee8018ff97c152620db7a517 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 11:53:16 +0200 Subject: [PATCH 04/16] =?UTF-8?q?Fix=20Warnings:=20unused=20parameter=20?= =?UTF-8?q?=E2=80=98member=5Fname=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: unused parameter ‘member_name’ [-Wunused-parameter] static void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx,t_RsFlags32& v,const std::string& member_name) ^~~~~~~~~~~ --- libretroshare/src/serialiser/rstypeserializer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/serialiser/rstypeserializer.h b/libretroshare/src/serialiser/rstypeserializer.h index 333f1a364..fe97ff210 100644 --- a/libretroshare/src/serialiser/rstypeserializer.h +++ b/libretroshare/src/serialiser/rstypeserializer.h @@ -333,7 +333,7 @@ class RsTypeSerializer //=================================================================================================// template - static void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx,t_RsFlags32& v,const std::string& member_name) + static void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx,t_RsFlags32& v,const std::string& /*member_name*/) { switch(j) { From 9021609a6b02ccb7fe865c1b28ba643383a0812f Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 11:55:23 +0200 Subject: [PATCH 05/16] =?UTF-8?q?Fix=20Warnings:=20unused=20variable=20?= =?UTF-8?q?=E2=80=98p=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: unused variable ‘p’ [-Wunused-variable] unsigned char *p,*buf_in=NULL; ^ --- libretroshare/src/pqi/authssl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index ccc176908..f04e71354 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -815,7 +815,7 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/) const EVP_MD *type = EVP_sha1(); EVP_MD_CTX *ctx = EVP_MD_CTX_create(); - unsigned char *p,*buf_in=NULL; + unsigned char *buf_in=NULL; unsigned char *buf_hashout=NULL,*buf_sigout=NULL; int inl=0,hashoutl=0; int sigoutl=0; @@ -874,7 +874,7 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/) std::cerr << "Buffers Allocated" << std::endl; #if OPENSSL_VERSION_NUMBER < 0x10100000L - p=buf_in; + unsigned char *p=buf_in; i2d(data,&p); #endif From ca291b7ee686e1bd2be2a2461b620518ccf20c62 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:05:58 +0200 Subject: [PATCH 06/16] =?UTF-8?q?Fix=20Warnings:=20warning:=20unused=20var?= =?UTF-8?q?iable=20=E2=80=98i2d=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: unused variable ‘i2d’ [-Wunused-variable] int (*i2d)(X509_CINF*, unsigned char**) = i2d_X509_CINF; ^~~ --- libretroshare/src/pqi/authssl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index f04e71354..9317f69dc 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -977,9 +977,9 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic) /* verify GPG signature */ /*** NOW The Manual signing bit (HACKED FROM asn1/a_sign.c) ***/ - int (*i2d)(X509_CINF*, unsigned char**) = i2d_X509_CINF; #if OPENSSL_VERSION_NUMBER < 0x10100000L + int (*i2d)(X509_CINF*, unsigned char**) = i2d_X509_CINF; ASN1_BIT_STRING *signature = x509->signature; X509_CINF *data = x509->cert_info; #else From 91e3cc3e5fab30f03ddd3e076bbee9c85609b7a1 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:08:29 +0200 Subject: [PATCH 07/16] =?UTF-8?q?Fix=20Warnings:=20variable=20=E2=80=98p?= =?UTF-8?q?=E2=80=99=20set=20but=20not=20used?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: variable ‘p’ set but not used [-Wunused-but-set-variable] unsigned char *p,*buf_in=NULL; ^ --- libretroshare/src/pqi/authssl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index 9317f69dc..c28c5d0d3 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -993,7 +993,7 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic) const EVP_MD *type = EVP_sha1(); EVP_MD_CTX *ctx = EVP_MD_CTX_create(); - unsigned char *p,*buf_in=NULL; + unsigned char *buf_in=NULL; unsigned char *buf_hashout=NULL,*buf_sigout=NULL; int inl=0,hashoutl=0; int sigoutl=0; @@ -1026,13 +1026,13 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic) diagnostic = RS_SSL_HANDSHAKE_DIAGNOSTIC_MALLOC_ERROR ; goto err; } - p=buf_in; #ifdef AUTHSSL_DEBUG std::cerr << "Buffers Allocated" << std::endl; #endif #if OPENSSL_VERSION_NUMBER < 0x10100000L + unsigned char *p=buf_in; i2d(data,&p); #endif /* data in buf_in, ready to be hashed */ From 9b1209db6818404af47031a810c0a992ea7db161 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:14:04 +0200 Subject: [PATCH 08/16] =?UTF-8?q?Fix=20Warnings:=20unused=20parameter=20?= =?UTF-8?q?=E2=80=98s=E2=80=99=20&=20'n'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: unused parameter ‘s’ [-Wunused-parameter] template<> uint32_t RsTypeSerializer::serial_size(const PeerBandwidthLimits& s) ^ --- libretroshare/src/rsitems/rsconfigitems.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/rsitems/rsconfigitems.cc b/libretroshare/src/rsitems/rsconfigitems.cc index 15a8dd624..f6296bd04 100644 --- a/libretroshare/src/rsitems/rsconfigitems.cc +++ b/libretroshare/src/rsitems/rsconfigitems.cc @@ -192,7 +192,7 @@ void RsPeerStunItem::serial_process(RsGenericSerializer::SerializeJob j,RsGeneri RsTypeSerializer::serial_process(j,ctx,stunList,"stunList") ; } -template<> uint32_t RsTypeSerializer::serial_size(const PeerBandwidthLimits& s) +template<> uint32_t RsTypeSerializer::serial_size(const PeerBandwidthLimits& /*s*/) { return 4+4 ; } @@ -213,7 +213,7 @@ template<> bool RsTypeSerializer::deserialize(const uint8_t data[], uint32_t siz return ok; } -template<> void RsTypeSerializer::print_data(const std::string& n, const PeerBandwidthLimits& s) +template<> void RsTypeSerializer::print_data(const std::string& /*n*/, const PeerBandwidthLimits& s) { std::cerr << " [Peer BW limit] " << s.max_up_rate_kbs << " / " << s.max_dl_rate_kbs << std::endl; } From ee7e92d6c4a960c9f1213f22a61974641ac9bc38 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:15:45 +0200 Subject: [PATCH 09/16] =?UTF-8?q?Fix=20Warnings:=20this=20=E2=80=98if?= =?UTF-8?q?=E2=80=99=20clause=20does=20not=20guard...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(buffer.empty()) ^~ --- libretroshare/src/util/rsrecogn.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/util/rsrecogn.cc b/libretroshare/src/util/rsrecogn.cc index 8580c7780..a372b9b2d 100644 --- a/libretroshare/src/util/rsrecogn.cc +++ b/libretroshare/src/util/rsrecogn.cc @@ -552,8 +552,8 @@ RsGxsRecognTagItem *RsRecogn::extractTag(const std::string &encoded) std::vector buffer = Radix64::decode(encoded); pktsize = buffer.size(); - if(buffer.empty()) - return NULL ; + if( buffer.empty() ) + return NULL; RsGxsRecognSerialiser serialiser; RsItem *item = serialiser.deserialise(buffer.data(), &pktsize); From 58c812aea8d98471966d8dd7c7f6906561a6e4c2 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:17:01 +0200 Subject: [PATCH 10/16] =?UTF-8?q?Fix=20Warnings:=20unused=20parameter=20?= =?UTF-8?q?=E2=80=98s=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: unused parameter ‘s’ [-Wunused-parameter] template<> uint32_t RsTypeSerializer::serial_size(uint16_t /* type_subtype */,const uint32_t& s) ^ --- libretroshare/src/serialiser/rstypeserializer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretroshare/src/serialiser/rstypeserializer.cc b/libretroshare/src/serialiser/rstypeserializer.cc index 054db45a4..33c3a90e9 100644 --- a/libretroshare/src/serialiser/rstypeserializer.cc +++ b/libretroshare/src/serialiser/rstypeserializer.cc @@ -193,7 +193,7 @@ template<> void RsTypeSerializer::print_data(const std::string& n, uint16_t type // TlvInt with subtype // //=================================================================================================// -template<> uint32_t RsTypeSerializer::serial_size(uint16_t /* type_subtype */,const uint32_t& s) +template<> uint32_t RsTypeSerializer::serial_size(uint16_t /* type_subtype */,const uint32_t& /*s*/) { return GetTlvUInt32Size() ; } From a6acc72c8931ce1da08d1d9d742879cf273dc152 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:18:51 +0200 Subject: [PATCH 11/16] =?UTF-8?q?Fix=20Warnings:=20this=20=E2=80=98if?= =?UTF-8?q?=E2=80=99=20clause=20does=20not=20guard...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(data.isRawData()) ^~ --- libresapi/src/api/ApiServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libresapi/src/api/ApiServer.cpp b/libresapi/src/api/ApiServer.cpp index 327dd6260..d4e1c9fe5 100644 --- a/libresapi/src/api/ApiServer.cpp +++ b/libresapi/src/api/ApiServer.cpp @@ -377,8 +377,8 @@ std::string ApiServer::handleRequest(Request &request) if(data.isRawData()) return data.getRawData(); - if(!resp.mCallbackName.empty()) - outstream << resource_api::makeKeyValueReference("callback_name", resp.mCallbackName); + if(!resp.mCallbackName.empty()) + outstream << resource_api::makeKeyValueReference("callback_name", resp.mCallbackName); outstream << resource_api::makeKeyValue("debug_msg", debugString.str()); outstream << resource_api::makeKeyValueReference("returncode", returncode); From 523730f31ad37bd74a75d6419009202a531d7590 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:21:08 +0200 Subject: [PATCH 12/16] =?UTF-8?q?Fix=20Warnings:=20unused=20parameter=20?= =?UTF-8?q?=E2=80=98resp=E2=80=99,=20'req'=20&=20'resp'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: unused parameter ‘resp’ [-Wunused-parameter] virtual void gxsDoWork(Request &req, Response &resp) ^~~~ --- libresapi/src/api/IdentityHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libresapi/src/api/IdentityHandler.cpp b/libresapi/src/api/IdentityHandler.cpp index be2e28622..8e2f5eee3 100644 --- a/libresapi/src/api/IdentityHandler.cpp +++ b/libresapi/src/api/IdentityHandler.cpp @@ -106,7 +106,7 @@ public: {} protected: - virtual void gxsDoWork(Request &req, Response &resp) + virtual void gxsDoWork(Request &req, Response & /* resp */) { RsGxsIdGroup group; std::string gxs_id; @@ -545,7 +545,7 @@ ResponseTask* IdentityHandler::handleCreateIdentity(Request & /* req */, Respons return new CreateIdentityTask(mRsIdentity); } -ResponseTask* IdentityHandler::handleDeleteIdentity(Request& req, Response& resp) +ResponseTask* IdentityHandler::handleDeleteIdentity(Request& /* req */, Response& /* resp */) { return new DeleteIdentityTask(mRsIdentity); } From bf47edfd1283aeaae64260b0df562ede24f58405 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:22:46 +0200 Subject: [PATCH 13/16] Fix Warnings: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(_hash.isNull()) ^~ --- retroshare-gui/src/gui/RetroShareLink.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/retroshare-gui/src/gui/RetroShareLink.cpp b/retroshare-gui/src/gui/RetroShareLink.cpp index 28a2d09c6..c3d2c0450 100644 --- a/retroshare-gui/src/gui/RetroShareLink.cpp +++ b/retroshare-gui/src/gui/RetroShareLink.cpp @@ -600,16 +600,16 @@ void RetroShareLink::check() if(!checkPGPId(_GPGid)) _valid = false ; break ; - case TYPE_IDENTITY: - if(_name.isNull()) - _valid = false ; + case TYPE_IDENTITY: + if(_name.isNull()) + _valid = false ; - if(_radix_group_data.isNull()) - _valid = false ; + if(_radix_group_data.isNull()) + _valid = false ; - if(_hash.isNull()) - _valid = false ; - break ; + if(_hash.isNull()) + _valid = false ; + break ; case TYPE_PERSON: if(_size != 0) @@ -858,8 +858,8 @@ QString RetroShareLink::niceName() const if (type() == TYPE_PERSON) return PeerDefs::rsid(name().toUtf8().constData(), RsPgpId(hash().toStdString())); - if(type() == TYPE_IDENTITY) - return QObject::tr("Identity link (name=%1, ID=%2)").arg(_name).arg(_hash) ; + if(type() == TYPE_IDENTITY) + return QObject::tr("Identity link (name=%1, ID=%2)").arg(_name).arg(_hash) ; if(type() == TYPE_PUBLIC_MSG) { RsPeerDetails detail; From f352939154cdc991beb45782907de68cc7185e70 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:25:29 +0200 Subject: [PATCH 14/16] Fix Warnings: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(! rsIdentity->getIdDetails(gxs_id,details)) ^~ --- retroshare-gui/src/gui/Identity/IdDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index 755dab9c9..9b1901104 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -2472,8 +2472,8 @@ void IdDialog::copyRetroshareLink() RsIdentityDetails details ; - if(! rsIdentity->getIdDetails(gxs_id,details)) - return ; + if(! rsIdentity->getIdDetails(gxs_id,details)) + return ; if (!mIdQueue) return; From 5022ef00d4ab425bd86c313ce4252f93fe03df30 Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 12:26:37 +0200 Subject: [PATCH 15/16] =?UTF-8?q?Fix=20Warnings:=20this=20=E2=80=98if?= =?UTF-8?q?=E2=80=99=20clause=20does=20not=20guard...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(!mPosterId.isNull()) ^~ --- retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp index aaab89231..61ecf0fbd 100644 --- a/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp +++ b/retroshare-gui/src/gui/gxsforums/CreateGxsForumMsg.cpp @@ -278,10 +278,10 @@ void CreateGxsForumMsg::loadFormInformation() uint32_t fl = IDCHOOSER_ID_REQUIRED ; if( (mForumMeta.mSignFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG) || (mForumMeta.mSignFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG_KNOWN)) - fl |= IDCHOOSER_NON_ANONYMOUS ; + fl |= IDCHOOSER_NON_ANONYMOUS; - if(!mPosterId.isNull()) - fl |= IDCHOOSER_NO_CREATE; + if(!mPosterId.isNull()) + fl |= IDCHOOSER_NO_CREATE; ui.idChooser->setFlags(fl) ; From 4a2f688f148608f780a01414269318de773e6cda Mon Sep 17 00:00:00 2001 From: Phenom Date: Mon, 8 May 2017 13:01:34 +0200 Subject: [PATCH 16/16] Fix Windows Compilation: pqi/authssl.cc: In member function 'virtual X509* AuthSSLimpl::SignX509ReqWithGPG(X509_REQ*, long int)': pqi/authssl.cc:929:3: error: jump to label 'err' [-fpermissive] err: ^ pqi/authssl.cc:872:22: error: from here [-fpermissive] goto err; ^ pqi/authssl.cc:877:24: error: crosses initialization of 'unsigned char* p' unsigned char *p=buf_in; ^ pqi/authssl.cc: In member function 'virtual bool AuthSSLimpl::AuthX509WithGPG(X509*, uint32_t&)': pqi/authssl.cc:1091:1: error: jump to label 'err' [-fpermissive] err: ^ pqi/authssl.cc:1027:8: error: from here [-fpermissive] goto err; ^ pqi/authssl.cc:1035:17: error: crosses initialization of 'unsigned char* p' unsigned char *p=buf_in; ^ --- libretroshare/src/pqi/authssl.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index c28c5d0d3..30f724a7e 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -854,6 +854,7 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/) #if OPENSSL_VERSION_NUMBER < 0x10100000L inl=i2d(data,NULL); buf_in=(unsigned char *)OPENSSL_malloc((unsigned int)inl); + unsigned char *p=NULL; #else inl=i2d_re_X509_tbs(x509,&buf_in) ; // this does the i2d over x509->cert_info #endif @@ -874,7 +875,7 @@ X509 *AuthSSLimpl::SignX509ReqWithGPG(X509_REQ *req, long /*days*/) std::cerr << "Buffers Allocated" << std::endl; #if OPENSSL_VERSION_NUMBER < 0x10100000L - unsigned char *p=buf_in; + p=buf_in; i2d(data,&p); #endif @@ -1002,6 +1003,7 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic) #if OPENSSL_VERSION_NUMBER < 0x10100000L inl=i2d(data,NULL); buf_in=(unsigned char *)OPENSSL_malloc((unsigned int)inl); + unsigned char *p=NULL; #else inl=i2d_re_X509_tbs(x509,&buf_in) ; // this does the i2d over x509->cert_info #endif @@ -1032,7 +1034,7 @@ bool AuthSSLimpl::AuthX509WithGPG(X509 *x509,uint32_t& diagnostic) #endif #if OPENSSL_VERSION_NUMBER < 0x10100000L - unsigned char *p=buf_in; + p=buf_in; i2d(data,&p); #endif /* data in buf_in, ready to be hashed */