Ethereal-dev: Re: [Ethereal-dev] Use of C99 code in 0.10.8

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Andrew Hood <ajhood@xxxxxxxxx>
Date: Mon, 03 Jan 2005 15:08:13 +1100
Guy Harris wrote:
LEGO wrote:

A question, what do I have to change to compile with -pedantic?


Nothing, at least on OS X, it appears.

Another question might be "what do we have to change so that compiling with -pedantic doesn't produce any more warnings than compiling without -pedantic does?" I've fixed some of the warnings, but not all - there are a bunch of warnings about converting between "char *" and "{guchar *, guint8 *, unsigned char *)", for example.

In addition, the configure script option that enables -pedantic also enables a number of other options, which cause other warnings, such as warnings about function declarations in system or third-party package headers that don't have prototype arguments. There's at least one case where either a GLib or GTK+ header (I forget which) declares a function without a prototype (in a deliberate attempt to avoid function prototype checking), which produces a warning with -pedantic, at least with the compiler I have). I think I've seen on at least some versions of Solaris declarations in X11 headers that have no prototypes.

IIRC all you need to do is supply the right compiler options to get proper prototypes.

I don't have the Solaris one at hand, but with AIX 4.x headers it is -DFUNCPROTO=15

--
There's no point in being grown up if you can't be childish sometimes.
                -- Dr. Who