[omniORB] VC6.0 gives warning C4097

Duncan Grisby dgrisby@uk.research.att.com
Tue, 29 Jan 2002 11:24:24 +0000


On Thursday 24 January, jon.kristensen@kongsberg-simrad.com wrote:

> I am now trying omniORB 4.0, and when compiling with warning level 4 and
> above, I get a huge amount of warnings like:
> 
> d:\omni\include\omniorb4\seqtemplatedecls.h(602) : warning C4097:
> typedef-name 'Base_T_seq' used as synonym for class-name '

I've looked up the warning on MSDN, and the write-up is rather
incomprehensible. The code is the way it is for clarity. I don't think
it's invalid.

> d:\omni\include\omnithread.h(622) : warning C4511: 'omni_thread' :
> copy constructor could not be generated
>         d:\omni\include\omnithread.h(364) : see declaration of 'omni_thread'

This one is probably fixable by declaring a private copy constructor.
I'll have to think about whether that will break anything.

> d:\omni\include\omnithread.h(558) : warning C4100: 'arg' :
> unreferenced formal parameter

Those are easy to eliminate by removing the arg argument name.

> What is the omniORB philosophy on this?

We generally like to remove as many warnings as possible, as long as
it doesn't compromise code clarity or performance. There is a limit on
how far it is sensible to go, though. One option for you to get rid of
all your warnings is to add pragmas to suppress them. If you look at
include/omniORB4/CORBA_sysdep.h, you'll see a couple of suppressed
warnings for VC++ already.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --