[omniORB] How to avoid compile warnings

Brecht Vermeulen Brecht.Vermeulen@rug.ac.be
Wed Jul 10 12:54:00 2002


Hi Andre,

try to use o_id.in() in activate_object_with_id and deactivate_object.

best regards,
Brecht

On Wed, 10 Jul 2002, Andrey Koubychev wrote:

> Hello omniorb-listers,
>
> I would like to avoid annoying warning with gcc 2.95.3 when compiling
> following code :
>
>
> in definition
> class BaseModule {....
> PortableServer::ObjectId_var o_id;
> ....
> }
> in Start member
>         poa->activate_object_with_id(o_id,this);
>
> in dctor
>         poa->deactivate_object (o_id);
>
>
> Warnings i get :
>
> BaseModule.cpp: In method `void BaseModule::Start(bool = true)':
> BaseModule.cpp:208: warning: choosing `PortableServer::ObjectId_var::operator Po
> rtableServer::ObjectId &()' over `PortableServer::ObjectId_var::operator const P
> ortableServer::ObjectId &() const'
> BaseModule.cpp:208: warning:   for conversion from `PortableServer::ObjectId_var
> ' to `const PortableServer::ObjectId &'
> BaseModule.cpp:208: warning:   because conversion sequence for the argument is b
> etter
> BaseModule.cpp: In method `BaseModule::~BaseModule()':
> BaseModule.cpp:272: warning: choosing `PortableServer::ObjectId_var::operator Po
> rtableServer::ObjectId &()' over `PortableServer::ObjectId_var::operator const P
> ortableServer::ObjectId &() const'
> BaseModule.cpp:272: warning:   for conversion from `PortableServer::ObjectId_var
> ' to `const PortableServer::ObjectId &'
> BaseModule.cpp:272: warning:   because conversion sequence for the argument is b
> etter
>
>
> --
> Best regards,
>  Andrey                          mailto:email@vtc.ru
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@realvnc.com
> http://www.realvnc.com/mailman/listinfo/omniorb-list
>