Skip to content

Commit

Permalink
Bug 5343: Fix remaining GCC v14 build issues (#1673)
Browse files Browse the repository at this point in the history
  • Loading branch information
yadij committed Feb 15, 2024
1 parent 17434dc commit e6c4a53
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/auth/basic/LDAP/basic_ldap_auth.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/auth/digest/eDirectory/edir_ldapext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)

/**********************************************************************
Expand Down
5 changes: 1 addition & 4 deletions src/base/InstanceId.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class InstanceId
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; }
Expand All @@ -67,10 +68,6 @@ class InstanceId

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.
Expand Down

0 comments on commit e6c4a53

Please sign in to comment.