[omniORB] Compilation warnings
bjorn rohde jensen
bjensen@mdsproteomics.dk
Tue, 31 Jul 2001 15:48:11 +0200
Andrew Weaver wrote:
>
> Moi, I prefer to compile with gcc and to have the Werr flag set. However,
> this is a bit of a problem.
>
> I have declared and Object Id as PortableServer::ObjectId_var ObjId. When I
> use it with
> activate_object_with_id(), I get warnings like
> ResMgr.cc:116: warning: choosing `PortableServer::ObjectId_var::operator
> PortableServer::ObjectId &
> ()' over `PortableServer::ObjectId_var::operator const
> PortableServer::ObjectId &() const'
> ResMgr.cc:116: warning: for conversion from `PortableServer::ObjectId_var'
> to`const PortableServer::ObjectId &'
> ResMgr.cc:116: warning: because conversion sequence for the argument is
> better
>
> and so on. Is there an easy way to avoid these messages?
>
> Kind Regards
>
> Andy Weaver
Hi Andrew,
You get these warning, because you are trying to pass a var wrapper
type instead
of the expected type. You can get rid of the warnings by using the
.in(),.inout(),
.out() and ._retn() functions provided by the var types. That is try to
pass
ObjId.in() instead of ObjId.
Yours sincerely
Bjorn R. Jensen