From: Amos Jeffries Date: Wed, 14 Feb 2024 04:53:11 +0000 (+0000) Subject: Bug 5343: Fix remaining GCC v14 build issues (#1673) X-Git-Tag: SQUID_6_8~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6c4a5330864408311f1a503812eab31f2f20746;p=thirdparty%2Fsquid.git Bug 5343: Fix remaining GCC v14 build issues (#1673) --- diff --git a/src/auth/basic/LDAP/basic_ldap_auth.cc b/src/auth/basic/LDAP/basic_ldap_auth.cc index 4d9a78574c..f79a5b8898 100644 --- a/src/auth/basic/LDAP/basic_ldap_auth.cc +++ b/src/auth/basic/LDAP/basic_ldap_auth.cc @@ -795,7 +795,7 @@ readSecret(const char *filename) if ((e = strrchr(buf, '\r'))) *e = 0; - passwd = (char *) calloc(sizeof(char), strlen(buf) + 1); + passwd = static_cast(calloc(strlen(buf) + 1, sizeof(char))); if (!passwd) { fprintf(stderr, PROGRAM_NAME " ERROR: can not allocate memory\n"); exit(EXIT_FAILURE); diff --git a/src/auth/digest/eDirectory/edir_ldapext.cc b/src/auth/digest/eDirectory/edir_ldapext.cc index 6f3afc2a60..d2c63f4026 100644 --- a/src/auth/digest/eDirectory/edir_ldapext.cc +++ b/src/auth/digest/eDirectory/edir_ldapext.cc @@ -69,7 +69,7 @@ #define NMAS_LDAP_EXT_VERSION 1 -#define SMB_MALLOC_ARRAY(type, nelem) calloc(sizeof(type), nelem) +#define SMB_MALLOC_ARRAY(type, nelem) calloc(nelem, sizeof(type)) #define DEBUG(level, args) /********************************************************************** diff --git a/src/base/InstanceId.h b/src/base/InstanceId.h index a48be882cc..d3e2ebb2b2 100644 --- a/src/base/InstanceId.h +++ b/src/base/InstanceId.h @@ -49,6 +49,7 @@ public: typedef ValueType Value; ///< id storage type InstanceId() {change();} + InstanceId(InstanceId &&) = delete; // no copying/moving of any kind operator Value() const { return value; } bool operator ==(const InstanceId &o) const { return value == o.value; } @@ -67,10 +68,6 @@ public: public: Value value = Value(); ///< instance identifier - -private: - InstanceId(const InstanceId &); ///< not implemented; IDs are unique - InstanceId& operator=(const InstanceId &); ///< not implemented }; /// An InstanceIdDefinitions() helper. Avoid direct use.