]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 5343: Fix remaining GCC v14 build issues (#1673)
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 14 Feb 2024 04:53:11 +0000 (04:53 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 14 Feb 2024 09:05:06 +0000 (09:05 +0000)
src/auth/basic/LDAP/basic_ldap_auth.cc
src/auth/digest/eDirectory/edir_ldapext.cc
src/base/InstanceId.h

index 4d9a78574cbae852c082712452165735d6656122..f79a5b88984617282fe1e3e913af80f2549ea04c 100644 (file)
@@ -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<char *>(calloc(strlen(buf) + 1, sizeof(char)));
     if (!passwd) {
         fprintf(stderr, PROGRAM_NAME " ERROR: can not allocate memory\n");
         exit(EXIT_FAILURE);
index f34341c912c2930d517dea9538e610ca729303a7..13e7daca67b5c3ae8a660721e332731b105d1082 100644 (file)
@@ -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)
 
 /**********************************************************************
index a48be882cc4ff72a5b9b6d489639375512e2f9b6..d3e2ebb2b2e747c2f21d85164324ce5423c0bb37 100644 (file)
@@ -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.