Richard Pitts
2012-05-02 17:12:05 UTC
Hi
We are using OmniORB 4.1.5 for Visual Studio 2008 and have recently
changed our compiler warning level to 4 (highest). Unfortunately the
compiler is reporting a lot of C4127 and C4512 warnings for OmniORB. We
appreciate these are not important but it would be nice to compile
against OmniORB warning free.
The following warnings are because of the do { } while(0); loops in the
marshalling methods. Most are because of the CdrMarshal and CdrUnMarshal
macros (line 236 and 256).
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(331)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(346)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(352)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(357)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(589)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(606)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(975)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(979)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(991)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(995)
: warning C4127: conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1007) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1011) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1023) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1027) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1040) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1044) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1056) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1060) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1075) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1080) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1103) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1108) : warning C4127:
conditional expression is constant
These warnings are because of the reference member variable within each
of the classes/structs.
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1404) : warning C4512:
'cdrStreamAdapter' : assignment operator could not be generated
3> C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1328) : see declaration
of 'cdrStreamAdapter'
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1562) : warning C4512:
'cdrValueChunkStream' : assignment operator could not be generated
3> C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1416) : see declaration
of 'cdrValueChunkStream'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Object_vartypes.h(313) :
warning C4512: 'CORBA::Object_INOUT_arg' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Object_vartypes.h(290) : see
declaration of 'CORBA::Object_INOUT_arg'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_LocalObject_vartypes.h(295) :
warning C4512: 'CORBA::LocalObject_INOUT_arg' : assignment operator
could not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_LocalObject_vartypes.h(272) :
see declaration of 'CORBA::LocalObject_INOUT_arg'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(152)
: warning C4512: 'CORBA::Any::from_fixed' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(145) : see declaration
of 'CORBA::Any::from_fixed'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(189)
: warning C4512: 'CORBA::Any::to_boolean' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(186) : see declaration
of 'CORBA::Any::to_boolean'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(193)
: warning C4512: 'CORBA::Any::to_char' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(190) : see declaration
of 'CORBA::Any::to_char'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(197)
: warning C4512: 'CORBA::Any::to_wchar' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(194) : see declaration
of 'CORBA::Any::to_wchar'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(201)
: warning C4512: 'CORBA::Any::to_octet' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(198) : see declaration
of 'CORBA::Any::to_octet'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(210)
: warning C4512: 'CORBA::Any::to_string' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(202) : see declaration
of 'CORBA::Any::to_string'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(219)
: warning C4512: 'CORBA::Any::to_wstring' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(211) : see declaration
of 'CORBA::Any::to_wstring'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(227)
: warning C4512: 'CORBA::Any::to_fixed' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(220) : see declaration
of 'CORBA::Any::to_fixed'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(231)
: warning C4512: 'CORBA::Any::to_object' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(228) : see declaration
of 'CORBA::Any::to_object'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(235)
: warning C4512: 'CORBA::Any::to_abstract_base' : assignment operator
could not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(232) : see declaration
of 'CORBA::Any::to_abstract_base'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(239)
: warning C4512: 'CORBA::Any::to_value' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(236) : see declaration
of 'CORBA::Any::to_value'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_ValueBase_vartypes.h(314) :
warning C4512: 'CORBA::ValueBase_INOUT_arg' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_ValueBase_vartypes.h(290) :
see declaration of 'CORBA::ValueBase_INOUT_arg'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(148) : warning
C4512: 'CORBA::TypeCode_INOUT_arg' : assignment operator could not be
generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(135) : see
declaration of 'CORBA::TypeCode_INOUT_arg'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(182) : warning
C4512: 'CORBA::TypeCode_OUT_arg' : assignment operator could not be
generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(154) : see
declaration of 'CORBA::TypeCode_OUT_arg'
Kind Regards
Richard Pitts
Windows Developer
CDL
</PRE>
<p style="font-family:'Arial';font-size:8pt">
**********************************************************************<br>
Please consider the environment - do you really need to print this email?<br>
<br>
This email is intended only for the person(s) named above and may contain private and confidential information. If it has come to you in error, please destroy and permanently delete any copy in your possession and contact us on +44 (0) 161 480 4420. The information in this email is copyright © CDL Group Holdings Limited. We cannot accept any liability for any loss or damage sustained as a result of software viruses. It is your responsibility to carry out such virus checking as is necessary before opening any attachment.<br>
Cheshire Datasystems Limited uses software which automatically screens incoming emails for inappropriate content and attachments. If the software identifies such content or attachment, the email will be forwarded to our Technology Department for checking. You should be aware that any email which you send to Cheshire Datasystems Limited is subject to this procedure. <br>
Cheshire Datasystems Limited, Strata House, Kings Reach Road, Stockport SK4 2HD<br>
Registered in England and Wales with Company Number 3991057<br>
VAT registration: 727 1188 33</p>
<PRE>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20120502/8e4f31ff/attachment-0001.htm
We are using OmniORB 4.1.5 for Visual Studio 2008 and have recently
changed our compiler warning level to 4 (highest). Unfortunately the
compiler is reporting a lot of C4127 and C4512 warnings for OmniORB. We
appreciate these are not important but it would be nice to compile
against OmniORB warning free.
The following warnings are because of the do { } while(0); loops in the
marshalling methods. Most are because of the CdrMarshal and CdrUnMarshal
macros (line 236 and 256).
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(331)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(346)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(352)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(357)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(589)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(606)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(975)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(979)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(991)
: warning C4127: conditional expression is constant
3>C:\Program Files (x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(995)
: warning C4127: conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1007) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1011) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1023) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1027) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1040) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1044) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1056) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1060) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1075) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1080) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1103) : warning C4127:
conditional expression is constant
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1108) : warning C4127:
conditional expression is constant
These warnings are because of the reference member variable within each
of the classes/structs.
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1404) : warning C4512:
'cdrStreamAdapter' : assignment operator could not be generated
3> C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1328) : see declaration
of 'cdrStreamAdapter'
3>C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1562) : warning C4512:
'cdrValueChunkStream' : assignment operator could not be generated
3> C:\Program Files
(x86)\omniORB-4.1.5\include\omniORB4/cdrStream.h(1416) : see declaration
of 'cdrValueChunkStream'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Object_vartypes.h(313) :
warning C4512: 'CORBA::Object_INOUT_arg' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Object_vartypes.h(290) : see
declaration of 'CORBA::Object_INOUT_arg'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_LocalObject_vartypes.h(295) :
warning C4512: 'CORBA::LocalObject_INOUT_arg' : assignment operator
could not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_LocalObject_vartypes.h(272) :
see declaration of 'CORBA::LocalObject_INOUT_arg'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(152)
: warning C4512: 'CORBA::Any::from_fixed' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(145) : see declaration
of 'CORBA::Any::from_fixed'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(189)
: warning C4512: 'CORBA::Any::to_boolean' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(186) : see declaration
of 'CORBA::Any::to_boolean'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(193)
: warning C4512: 'CORBA::Any::to_char' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(190) : see declaration
of 'CORBA::Any::to_char'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(197)
: warning C4512: 'CORBA::Any::to_wchar' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(194) : see declaration
of 'CORBA::Any::to_wchar'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(201)
: warning C4512: 'CORBA::Any::to_octet' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(198) : see declaration
of 'CORBA::Any::to_octet'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(210)
: warning C4512: 'CORBA::Any::to_string' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(202) : see declaration
of 'CORBA::Any::to_string'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(219)
: warning C4512: 'CORBA::Any::to_wstring' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(211) : see declaration
of 'CORBA::Any::to_wstring'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(227)
: warning C4512: 'CORBA::Any::to_fixed' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(220) : see declaration
of 'CORBA::Any::to_fixed'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(231)
: warning C4512: 'CORBA::Any::to_object' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(228) : see declaration
of 'CORBA::Any::to_object'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(235)
: warning C4512: 'CORBA::Any::to_abstract_base' : assignment operator
could not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(232) : see declaration
of 'CORBA::Any::to_abstract_base'
3>c:\program files (x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(239)
: warning C4512: 'CORBA::Any::to_value' : assignment operator could not
be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_Any.h(236) : see declaration
of 'CORBA::Any::to_value'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_ValueBase_vartypes.h(314) :
warning C4512: 'CORBA::ValueBase_INOUT_arg' : assignment operator could
not be generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_ValueBase_vartypes.h(290) :
see declaration of 'CORBA::ValueBase_INOUT_arg'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(148) : warning
C4512: 'CORBA::TypeCode_INOUT_arg' : assignment operator could not be
generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(135) : see
declaration of 'CORBA::TypeCode_INOUT_arg'
3>c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(182) : warning
C4512: 'CORBA::TypeCode_OUT_arg' : assignment operator could not be
generated
3> c:\program files
(x86)\omniorb-4.1.5\include\omniorb4\CORBA_vartypes.h(154) : see
declaration of 'CORBA::TypeCode_OUT_arg'
Kind Regards
Richard Pitts
Windows Developer
CDL
</PRE>
<p style="font-family:'Arial';font-size:8pt">
**********************************************************************<br>
Please consider the environment - do you really need to print this email?<br>
<br>
This email is intended only for the person(s) named above and may contain private and confidential information. If it has come to you in error, please destroy and permanently delete any copy in your possession and contact us on +44 (0) 161 480 4420. The information in this email is copyright © CDL Group Holdings Limited. We cannot accept any liability for any loss or damage sustained as a result of software viruses. It is your responsibility to carry out such virus checking as is necessary before opening any attachment.<br>
Cheshire Datasystems Limited uses software which automatically screens incoming emails for inappropriate content and attachments. If the software identifies such content or attachment, the email will be forwarded to our Technology Department for checking. You should be aware that any email which you send to Cheshire Datasystems Limited is subject to this procedure. <br>
Cheshire Datasystems Limited, Strata House, Kings Reach Road, Stockport SK4 2HD<br>
Registered in England and Wales with Company Number 3991057<br>
VAT registration: 727 1188 33</p>
<PRE>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20120502/8e4f31ff/attachment-0001.htm