[omniORB] compiler warnings?

Dan Kegel dank@kegel.com
Tue, 11 Dec 2001 14:09:09 -0800


Building omniorb3.0.4 on Red Hat 7.2 I get the following warnings:

make[3]: Entering directory `/home/dank/omni/src/tool/omniidl/cxx'
../../../../bin/i586_linux_2.0_glibc2.1/omkdepend -D__cplusplus -D__GNUG__ -D__GNUC__ -DIDLMODULE_VERSION="0x2301" -I/usr/include
-DPYTHON_INCLUDE=<python1.5/Python.h> -I. -I../../../../include -D__x86__ -D__linux__ -D__OSVERSION__=2 idlc.cc idlpython.cc idlconfig.cc idldump.cc
idlvalidate.cc idlast.cc idlexpr.cc idlscope.cc idlrepoId.cc idltype.cc idlutil.cc idlerr.cc lex.yy.cc y.tab.cc
"idlc.cc":159:  (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE        || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))

                                                   ^--- expecting )

Seems like someone's grammar isn't expecting that trailing L in
a numerical constant...

../../../../bin/i586_linux_2.0_glibc2.1/omkdepend: warning:  (from idlc.cc) /usr/include/bits/stdio_lim.h: 20: # error "Never include <bits/stdio_lim.h>
directly; use <stdio.h> instead."
../../../../bin/i586_linux_2.0_glibc2.1/omkdepend: warning:  (from idlpython.cc) idlpython.cc: 308: #    error "omniidl requires Python 1.5.2 or higher"
../../../../bin/i586_linux_2.0_glibc2.1/omkdepend: warning:  (from idlexpr.cc) /usr/include/bits/mathdef.h: 20: # error "Never use <bits/mathdef.h> directly;
include <math.h> instead"

I assume these are spurious; my system does indeed have Python 1.5.2 
(which comes standard with red hat 7.2)

Nevertheless, it'd be nice to be rid of them.

There are also several of the sort
/usr/bin/g++ -c -O2  -Wall -Wno-unused -DUnixArchitecture -DCONFIG_DEFAULT_LOCATION=/etc/omniORB.cfg  -D_REENTRANT -I./.. -I./../.. -I./../../..
-DUSE_omniORB_logStream -D_OMNIORB_DYNAMIC_LIBRARY -fPIC -I.  -I../../../../../include -D__x86__ -D__linux__ -D__OSVERSION__=2 -o typecode.o ../typecode.cc
../typecode.cc: In function `PR_unionDiscriminator
TypeCode_union_helper::extractLabel (const CORBA::Any &,
CORBA::TypeCode *)':
../typecode.cc:4704: warning: `PR_unionDiscriminator lbl_value' might
be used uninitialized in this function

/usr/bin/g++ -c -O2  -Wall -Wno-unused -DUnixArchitecture -DCONFIG_DEFAULT_LOCATION=/etc/omniORB.cfg  -D_REENTRANT -I./.. -I./../.. -I./../../..
-DUSE_omniORB_logStream -D_OMNIORB_DYNAMIC_LIBRARY -fPIC -I.  -I../../../../../include -D__x86__ -D__linux__ -D__OSVERSION__=2 -o request.o ../request.cc
In file included from ../../remoteIdentity.h:40,
                 from ../request.cc:41:
../../omniIdentity.h:98: warning: `class omniIdentity' has virtual
functions but non-virtual destructor
In file included from ../request.cc:41:
../../remoteIdentity.h:95: warning: `class omniRemoteIdentity' has
virtual functions but non-virtual destructor
../request.cc: In method `void *RequestImpl::invoke ()':
../request.cc:334: warning: `int fwd' might be used uninitialized in
this function
../request.cc: In method `void *RequestImpl::send_oneway ()':
../request.cc:541: warning: `int fwd' might be used uninitialized in
this function

That non-virtual destructor one sounds bad.  Haven't looked at it, though.

I'm compiling using 

PLAT=i586_linux_2.0_glibc2.1
OPTS="platform=$PLAT PYTHON=`which python`"
rm -rf omni
tar -xzvf omniORB_304.tar.gz
cd omni/src
make export $OPTS
LD_PRELOAD_PATH=`cd ../lib/$PLAT; pwd`
export LD_PRELOAD_PATH
cd examples/echo
make all $OPTS

- Dan