summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-11-10 10:17:20 +0100
committerGitHub <noreply@github.com>2021-11-10 10:17:20 +0100
commit330bee4fc0833c16295dd615a044735173b36687 (patch)
treef9ccdb645bd1b4e93e71cdeb15326e0f3ab1433b
parentf89faa003e82516b83d995a9fa62be46d248d586 (diff)
parent43002d5505231e9e13870d6bec044166dd86480e (diff)
downloadATCD-330bee4fc0833c16295dd615a044735173b36687.tar.gz
Merge pull request #1719 from jwillemsen/jwi-memaddrwarning
Add default assignment operators to fix gcc warnings
-rw-r--r--ACE/ace/Asynch_IO.h1
-rw-r--r--ACE/ace/Dev_Poll_Reactor.h2
-rw-r--r--ACE/ace/Event_Handler_Handle_Timeout_Upcall.h1
-rw-r--r--ACE/ace/Future.h5
-rw-r--r--ACE/ace/Get_Opt.h2
-rw-r--r--ACE/ace/Hash_Map_Manager_T.h1
-rw-r--r--ACE/ace/Local_Tokens.cpp4
-rw-r--r--ACE/ace/Local_Tokens.h7
-rw-r--r--ACE/ace/MEM_Addr.cpp20
-rw-r--r--ACE/ace/MEM_Addr.h5
-rw-r--r--ACE/ace/Process.cpp1
-rw-r--r--ACE/ace/SOCK_Dgram_Mcast.h1
-rw-r--r--ACE/ace/SPIPE_Addr.h3
-rw-r--r--ACE/ace/Select_Reactor_Base.h2
-rw-r--r--ACE/ace/UNIX_Addr.h3
-rw-r--r--ACE/ace/UNIX_Addr.inl1
16 files changed, 22 insertions, 37 deletions
diff --git a/ACE/ace/Asynch_IO.h b/ACE/ace/Asynch_IO.h
index 819eed30e7c..6584abfc4e8 100644
--- a/ACE/ace/Asynch_IO.h
+++ b/ACE/ace/Asynch_IO.h
@@ -1556,7 +1556,6 @@ private:
ACE_Asynch_Write_Dgram (const ACE_Asynch_Write_Dgram &) = delete;
};
-
/**
* @class ACE_Handler
*
diff --git a/ACE/ace/Dev_Poll_Reactor.h b/ACE/ace/Dev_Poll_Reactor.h
index 88d30409c2e..c75cbc8cba0 100644
--- a/ACE/ace/Dev_Poll_Reactor.h
+++ b/ACE/ace/Dev_Poll_Reactor.h
@@ -1126,7 +1126,7 @@ protected:
int acquire (ACE_Time_Value *max_wait = 0);
private:
- Token_Guard (void);
+ Token_Guard ();
private:
/// The Reactor token.
diff --git a/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h b/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h
index 715cacb2c27..02133ad52ea 100644
--- a/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h
+++ b/ACE/ace/Event_Handler_Handle_Timeout_Upcall.h
@@ -87,7 +87,6 @@ public:
ACE_ALLOC_HOOK_DECLARE;
private:
-
/// Flag indicating that reference counting is required for this
/// event handler upcall.
int requires_reference_counting_;
diff --git a/ACE/ace/Future.h b/ACE/ace/Future.h
index e928370f1e6..f63695202fa 100644
--- a/ACE/ace/Future.h
+++ b/ACE/ace/Future.h
@@ -214,10 +214,10 @@ private:
mutable ACE_SYNCH_RECURSIVE_CONDITION value_ready_;
private:
- ACE_Future_Rep (void);
+ ACE_Future_Rep ();
protected:
- ~ACE_Future_Rep (void);
+ ~ACE_Future_Rep ();
};
/**
@@ -354,7 +354,6 @@ public:
ACE_ALLOC_HOOK_DECLARE;
private:
-
/// The ACE_Future_Rep
/// Protect operations on the <Future>.
typedef ACE_Future_Rep<T> FUTURE_REP;
diff --git a/ACE/ace/Get_Opt.h b/ACE/ace/Get_Opt.h
index 040df2b8cb2..96e06c30b69 100644
--- a/ACE/ace/Get_Opt.h
+++ b/ACE/ace/Get_Opt.h
@@ -434,7 +434,6 @@ private:
ACE_Get_Opt &operator= (ACE_Get_Opt &&) = delete;
private:
-
/// Holds the option string.
ACE_TString *optstring_;
@@ -481,7 +480,6 @@ private:
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
-
};
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/Hash_Map_Manager_T.h b/ACE/ace/Hash_Map_Manager_T.h
index 70f20f9e9ed..6960498bfe7 100644
--- a/ACE/ace/Hash_Map_Manager_T.h
+++ b/ACE/ace/Hash_Map_Manager_T.h
@@ -1119,7 +1119,6 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK>
class ACE_Hash_Map_Manager : public ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
{
public:
-
/**
* Initialize a @c Hash_Map_Manager with default size elements.
* @param table_alloc is a pointer to a memory allocator used for
diff --git a/ACE/ace/Local_Tokens.cpp b/ACE/ace/Local_Tokens.cpp
index 2aedeb0b94c..68cd3d36df3 100644
--- a/ACE/ace/Local_Tokens.cpp
+++ b/ACE/ace/Local_Tokens.cpp
@@ -160,10 +160,6 @@ ACE_TPQ_Entry::client_id (const ACE_TCHAR *id)
ACE_MAXCLIENTIDLEN);
}
-ACE_TSS_TPQ_Entry::~ACE_TSS_TPQ_Entry (void)
-{
-}
-
void
ACE_TSS_TPQ_Entry::dump () const
{
diff --git a/ACE/ace/Local_Tokens.h b/ACE/ace/Local_Tokens.h
index e52695aff37..6b137152143 100644
--- a/ACE/ace/Local_Tokens.h
+++ b/ACE/ace/Local_Tokens.h
@@ -216,7 +216,7 @@ public:
const ACE_TCHAR *client_id);
/// Destructor.
- virtual ~ACE_TSS_TPQ_Entry (void);
+ virtual ~ACE_TSS_TPQ_Entry () = default;
/// Allows us to pass args to the construction of the TSS object.
virtual ACE_TPQ_Entry *make_TSS_TYPE () const;
@@ -235,9 +235,8 @@ public:
#endif /* ACE_NO_TSS_TOKENS */
private:
- /// Private: should not be used
- ACE_TSS_TPQ_Entry (const ACE_TSS_TPQ_Entry &);
- void operator= (const ACE_TSS_TPQ_Entry &);
+ ACE_TSS_TPQ_Entry (const ACE_TSS_TPQ_Entry &) = delete;
+ void operator= (const ACE_TSS_TPQ_Entry &) = delete;
// = These are passed to the constructor of ACE_TPQ_Entry in
// make_TSS_TYPE
diff --git a/ACE/ace/MEM_Addr.cpp b/ACE/ace/MEM_Addr.cpp
index 4ee10c5b663..1e021a27deb 100644
--- a/ACE/ace/MEM_Addr.cpp
+++ b/ACE/ace/MEM_Addr.cpp
@@ -20,8 +20,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Addr)
-// Transform the current address into string format.
-
+/// Transform the current address into string format.
ACE_MEM_Addr::ACE_MEM_Addr ()
: ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr))
{
@@ -41,9 +40,7 @@ ACE_MEM_Addr::ACE_MEM_Addr (const ACE_TCHAR port_number[])
: ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr))
{
ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr");
- u_short pn = static_cast<u_short> (ACE_OS::strtoul (port_number,
- 0,
- 10));
+ u_short const pn = static_cast<u_short> (ACE_OS::strtoul (port_number, 0, 10));
this->initialize_local (pn);
}
@@ -91,20 +88,16 @@ ACE_MEM_Addr::addr_to_string (ACE_TCHAR s[],
}
// Transform the string into the current addressing format.
-
int
ACE_MEM_Addr::string_to_addr (const ACE_TCHAR s[])
{
ACE_TRACE ("ACE_MEM_Addr::string_to_addr");
- u_short pn = static_cast<u_short> (ACE_OS::strtoul (s,
- 0,
- 10));
+ u_short pn = static_cast<u_short> (ACE_OS::strtoul (s, 0, 10));
return this->set (pn);
}
-// Return the address.
-
+/// Return the address.
void *
ACE_MEM_Addr::get_addr () const
{
@@ -112,7 +105,7 @@ ACE_MEM_Addr::get_addr () const
return this->external_.get_addr ();
}
-// Set a pointer to the address.
+/// Set a pointer to the address.
void
ACE_MEM_Addr::set_addr (const void *addr, int len)
{
@@ -130,8 +123,7 @@ ACE_MEM_Addr::get_host_name (ACE_TCHAR hostname[],
return this->external_.get_host_name (hostname, len);
}
-// Return the character representation of the hostname.
-
+/// Return the character representation of the hostname.
const char *
ACE_MEM_Addr::get_host_name () const
{
diff --git a/ACE/ace/MEM_Addr.h b/ACE/ace/MEM_Addr.h
index 017756f0335..26485148dfa 100644
--- a/ACE/ace/MEM_Addr.h
+++ b/ACE/ace/MEM_Addr.h
@@ -35,11 +35,14 @@ class ACE_Export ACE_MEM_Addr : public ACE_Addr
{
public:
/// Default constructor.
- ACE_MEM_Addr (void);
+ ACE_MEM_Addr ();
/// Copy constructor.
ACE_MEM_Addr (const ACE_MEM_Addr &);
+ /// Assignment operator
+ ACE_MEM_Addr& operator= (const ACE_MEM_Addr& sa) = default;
+
/// Creates an ACE_MEM_Addr from a @a port_number
ACE_MEM_Addr (u_short port_number);
diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp
index 1807a04575a..6d36c2a7be7 100644
--- a/ACE/ace/Process.cpp
+++ b/ACE/ace/Process.cpp
@@ -38,7 +38,6 @@ static void sigchld_nop (int, siginfo_t *, ucontext_t *)
}
#endif /* ACE_WIN32 */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Process::ACE_Process ()
diff --git a/ACE/ace/SOCK_Dgram_Mcast.h b/ACE/ace/SOCK_Dgram_Mcast.h
index 12a885b7ac1..1fc3ab2430c 100644
--- a/ACE/ace/SOCK_Dgram_Mcast.h
+++ b/ACE/ace/SOCK_Dgram_Mcast.h
@@ -344,7 +344,6 @@ public:
int opts () const;
private:
-
/// Subscribe to a multicast address on one or more network interface(s).
/// (No QoS support.)
int subscribe_ifs (const ACE_INET_Addr &mcast_addr,
diff --git a/ACE/ace/SPIPE_Addr.h b/ACE/ace/SPIPE_Addr.h
index 455acd9acbb..f72e7b77910 100644
--- a/ACE/ace/SPIPE_Addr.h
+++ b/ACE/ace/SPIPE_Addr.h
@@ -39,6 +39,9 @@ public:
/// Copy constructor.
ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa);
+ /// Assignment operator
+ ACE_SPIPE_Addr& operator= (const ACE_SPIPE_Addr& sa) = default;
+
/// Create a ACE_SPIPE_Addr from a rendezvous point in the file
/// system.
ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
diff --git a/ACE/ace/Select_Reactor_Base.h b/ACE/ace/Select_Reactor_Base.h
index f076a2bffeb..edac5a28aa9 100644
--- a/ACE/ace/Select_Reactor_Base.h
+++ b/ACE/ace/Select_Reactor_Base.h
@@ -375,7 +375,6 @@ public:
ACE_ALLOC_HOOK_DECLARE;
private:
-
/// Remove the binding of @a handle corresponding to position @a pos
/// in accordance with the @a mask.
int unbind (ACE_HANDLE handle,
@@ -437,7 +436,6 @@ public:
ACE_ALLOC_HOOK_DECLARE;
private:
-
/// Reference to the Handler_Repository we are iterating over.
ACE_Select_Reactor_Handler_Repository const * const rep_;
diff --git a/ACE/ace/UNIX_Addr.h b/ACE/ace/UNIX_Addr.h
index fed5df7fab6..1400760e6d1 100644
--- a/ACE/ace/UNIX_Addr.h
+++ b/ACE/ace/UNIX_Addr.h
@@ -43,6 +43,9 @@ public:
/// Copy constructor.
ACE_UNIX_Addr (const ACE_UNIX_Addr &sa);
+ /// Assignment operator
+ ACE_UNIX_Addr& operator= (const ACE_UNIX_Addr& sa) = default;
+
/// Creates an ACE_UNIX_Addr from a string.
ACE_UNIX_Addr (const char rendezvous_point[]);
diff --git a/ACE/ace/UNIX_Addr.inl b/ACE/ace/UNIX_Addr.inl
index 125ead75e32..40a57922386 100644
--- a/ACE/ace/UNIX_Addr.inl
+++ b/ACE/ace/UNIX_Addr.inl
@@ -2,7 +2,6 @@
#include "ace/OS_NS_string.h"
-
#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
ACE_BEGIN_VERSIONED_NAMESPACE_DECL