[omniORB] Compile warning on SLES10(32), gcc 4.1.0
Enver Cicak
Enver.Cicak at hermes-softlab.com
Mon Oct 30 14:31:18 GMT 2006
Hi all,
During code compile with (gcc version 4.1.0 , omniORB 4.0.7) I had warning
.../include/omniORB4/CORBA_Any.h: In constructor âCORBA::Any::to_string::to_string(const char*&, CORBA::ULong)â:"
.../include/omniORB4/CORBA_Any.h:208: warning: cast from type âconst char**â to type âchar**â casts away constness
.../include/omniORB4/CORBA_Any.h: In constructor âCORBA::Any::to_wstring::to_wstring(const CORBA::WChar*&, CORBA::ULong)â:
.../include/omniORB4/CORBA_Any.h:215: warning: cast from type âconst CORBA::WChar**â to type âCORBA::WChar**â casts away constness
I removed warning by changing following lines in CORBA_Any.h file
struct to_string {
- to_string(const char*& s, ULong b) : val((char*&)s), bound(b) { }
+ to_string(const char*& s, ULong b) : val(OMNI_CONST_CAST(char*&, s)), bound(b) { }
to_string(char*& s, ULong b) : val(s), bound(b) { } // deprecated
char*& val;
ULong bound;
};
struct to_wstring {
- to_wstring(const WChar*& s, ULong b) : val((WChar*&)s), bound(b) { }
+ to_wstring(const WChar*& s, ULong b) : val(OMNI_CONST_CAST(WChar*&, s)), bound(b) { }
to_wstring(WChar*& s, ULong b) : val(s), bound(b) { } // deprecated
WChar*& val;
ULong bound;
};
Regards,
Enver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20061030/b58d1a70/attachment.htm
More information about the omniORB-list
mailing list