mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix CppCheck in rscertificate.h
/libretroshare/src/pgp/rscertificate.cc:75: warning: Cppcheck(unusedVariable): Unused variable: res /libretroshare/src/pgp/rscertificate.h:55: warning: Cppcheck(operatorEqVarError): Member variable 'RsCertificate::ipv4_external_ip_and_port' is not assigned a value in 'RsCertificate::operator='. /libretroshare/src/pgp/rscertificate.h:55: warning: Cppcheck(operatorEqVarError): Member variable 'RsCertificate::ipv4_internal_ip_and_port' is not assigned a value in 'RsCertificate::operator='. /libretroshare/src/pgp/rscertificate.h:55: warning: Cppcheck(operatorEqVarError): Member variable 'RsCertificate::binary_pgp_key' is not assigned a value in 'RsCertificate::operator='. /libretroshare/src/pgp/rscertificate.h:55: warning: Cppcheck(operatorEqVarError): Member variable 'RsCertificate::binary_pgp_key_size' is not assigned a value in 'RsCertificate::operator='. /libretroshare/src/pgp/rscertificate.h:55: warning: Cppcheck(operatorEqVarError): Member variable 'RsCertificate::only_pgp' is not assigned a value in 'RsCertificate::operator='. /libretroshare/src/pgp/rscertificate.h:55: warning: Cppcheck(operatorEqVarError): Member variable 'RsCertificate::hidden_node' is not assigned a value in 'RsCertificate::operator='. /libretroshare/src/pgp/rscertificate.h:16: warning: Cppcheck(noExplicitConstructor): Class 'RsCertificate' has a constructor with 1 argument that is not explicit.
This commit is contained in:
parent
f91756a1bb
commit
60d476211f
@ -72,7 +72,7 @@ void RsCertificate::addPacket(uint8_t ptag, const unsigned char *mem, size_t siz
|
||||
|
||||
std::string RsCertificate::toStdString() const
|
||||
{
|
||||
std::string res ;
|
||||
//std::string res ;
|
||||
size_t BS = 1000 ;
|
||||
size_t p = 0 ;
|
||||
unsigned char *buf = new unsigned char[BS] ;
|
||||
|
@ -13,7 +13,7 @@ class RsCertificate
|
||||
// Constructs from text.
|
||||
// - new format: The input string should only contain radix chars and spaces/LF/tabs.
|
||||
//
|
||||
RsCertificate(const std::string& input_string) ;
|
||||
explicit RsCertificate(const std::string& input_string) ;
|
||||
|
||||
// Constructs from binary gpg key, and RsPeerDetails.
|
||||
//
|
||||
@ -52,7 +52,11 @@ class RsCertificate
|
||||
static void addPacket(uint8_t ptag, const unsigned char *mem, size_t size, unsigned char *& buf, size_t& offset, size_t& buf_size) ;
|
||||
|
||||
RsCertificate(const RsCertificate&) {} // non copy-able
|
||||
const RsCertificate& operator=(const RsCertificate&) { return *this ;} // non copy-able
|
||||
const RsCertificate& operator=(const RsCertificate&)
|
||||
{ memset(ipv4_external_ip_and_port,0,6); memset(ipv4_internal_ip_and_port,0,6);
|
||||
binary_pgp_key = NULL; binary_pgp_key_size = 0;
|
||||
only_pgp = false; hidden_node = false;
|
||||
return *this ;} // non copy-able
|
||||
|
||||
unsigned char ipv4_external_ip_and_port[6] ;
|
||||
unsigned char ipv4_internal_ip_and_port[6] ;
|
||||
|
Loading…
Reference in New Issue
Block a user