[omniORB] Warnings regarding copy ctors with new gcc
Matej Kenda
matej.kenda at hermes.si
Fri Jan 30 11:42:05 GMT 2004
Hi,
This patch removes the warnings, issued by gcc 3.3:
Index: include/omniORB4/poa.h
===================================================================
RCS file: /cvsroot/omniorb/omni/include/omniORB4/Attic/poa.h,v
retrieving revision 1.2.2.13
diff --unified -r1.2.2.13 poa.h
--- include/omniORB4/poa.h 26 Jul 2003 22:52:22 -0000 1.2.2.13
+++ include/omniORB4/poa.h 30 Jan 2004 10:38:53 -0000
@@ -682,7 +682,7 @@
protected:
inline ServantBase() {}
- inline ServantBase(const ServantBase&) {}
+ inline ServantBase(const ServantBase&) : omniServant() {}
inline ServantBase& operator = (const ServantBase&) { return *this; }
void* _do_this(const char* repoId);
@@ -706,7 +706,7 @@
protected:
inline RefCountServantBase() : pd_refCount(1) {}
- inline RefCountServantBase(const RefCountServantBase&) : pd_refCount(1) {}
+ inline RefCountServantBase(const RefCountServantBase&) : omniServant(), ServantBase(), pd_refCount(1) {}
inline RefCountServantBase& operator = (const RefCountServantBase&)
{ return *this; }
Best regards,
Matej
On Wed, 2004-01-21 at 16:52, Matej Kenda wrote:
> Hi,
>
> I have noticed that newer versions of g++ (3.3.1 on SUSE9 or 3.3.2 on
> Fedora 1) issue warnings about explicit initialisation of base classes
> when including headers of omniORB 4.0.3.
>
> I have checked the headers, but I'm not sure what's the problem or
> whether I should do anything to remove this warning.
>
> I have copied relevant portions of header files and the warning messages
> to the end of this e-mail.
>
> Regards,
>
> Matej
>
> ----
> omniServant.h:
>
> class omniServant {
> protected:
> inline omniServant() {}
> inline omniServant(const omniServant&) {}
> inline omniServant& operator = (const omniServant&) { return *this; }
> ...
>
> ----
> poa.h:
>
> class ServantBase : public virtual omniServant {
> public:
> virtual ~ServantBase();
>
> ...
> protected:
> inline ServantBase() {}
> inline ServantBase(const ServantBase&) {}
> inline ServantBase& operator = (const ServantBase&) { return *this;
> }
>
> ** Warning messages:
>
> In file included from
> /home/matejk/3rdparty/omniORB4/include/omniORB4/CORBA.h:449,
> from
> /home/matejk/src/include/ivd/i_types.h:10,
> from .linux.ia32/i_types.cc:3:
> /home/matejk/3rdparty/omniORB4/include/omniORB4/poa.h:
> In copy constructor `PortableServer::ServantBase::ServantBase(const PortableServer::ServantBase&)':
> /home/matejk/3rdparty/omniORB4/include/omniORB4/poa.h:691: warning:
> base class `class omniServant' should be explicitly initialized in the copy constructor
> /home/matejk/3rdparty/omniORB4/include/omniORB4/poa.h:
> In copy constructor `PortableServer::RefCountServantBase::RefCountServantBase(const PortableServer::RefCountServantBase&)':
> /home/matejk/3rdparty/omniORB4/include/omniORB4/poa.h:715: warning:
> base class `class omniServant' should be explicitly initialized in the copy constructor
> /home/matejk/3rdparty/omniORB4/include/omniORB4/poa.h:715: warning:
> base class `class PortableServer::ServantBase' should be explicitly initialized in the copy constructor
--
Matej Kenda, Lead Engineer
HERMES SoftLab (www.hermes-softlab.com)
Erjavčeva 2, 5000 Nova Gorica, Slovenia
More information about the omniORB-list
mailing list