[GRASS5] fixed lot's of compiler warnings

Hi,

as the subject says (valid for GRASS 6.1-CVS). This hopefully
improves the gcc4 and Fedora4 readiness...

Still todo for someone else:
lib/display
imagery/i.class
imagery/i.ortho.photo/photo.2target
imagery/i.ortho.photo/photo.2image
imagery/i.points
imagery/i.vpoints

All of them have this error (I dunno how to fix that):
zoom_box.c:5: error: 'y1' redeclared as different kind of symbol
zoom_box.c:5: error: 'y1' redeclared as different kind of symbol

Also remaining (too complicated for me):
raster/r.kappa
raster/r.random.cells
raster/r.random.surface
raster/wildfire/r.ros
raster/wildfire/r.spread
raster/wildfire/r.spreadpath
raster3d/r3.mask
raster3d/r3.mkdspf
visualization/nviz
visualization/xganim

Cheers

markus

Markus Neteler wrote:

as the subject says (valid for GRASS 6.1-CVS). This hopefully
improves the gcc4 and Fedora4 readiness...

Still todo for someone else:
lib/display
imagery/i.class
imagery/i.ortho.photo/photo.2target
imagery/i.ortho.photo/photo.2image
imagery/i.points
imagery/i.vpoints

All of them have this error (I dunno how to fix that):
zoom_box.c:5: error: 'y1' redeclared as different kind of symbol
zoom_box.c:5: error: 'y1' redeclared as different kind of symbol

Several options:

1. Don't include <math.h> from gis.h, and unconditionally redefine
M_PI, i.e.

  #undef M_PI
  #define M_PI ...

rather than:

  #ifdef M_PI
  #define M_PI ...
  #endif

2. Don't include <math.h> from gis.h, and use e.g. G_PI instead of
M_PI.

3. Rename all top-level occurrences of y0 and y1 to something else.

--
Glynn Clements <glynn@gclements.plus.com>

On Thu, Jul 14, 2005 at 01:54:02AM +0100, Glynn Clements wrote:

Markus Neteler wrote:

> as the subject says (valid for GRASS 6.1-CVS). This hopefully
> improves the gcc4 and Fedora4 readiness...
>
> Still todo for someone else:
> lib/display
> imagery/i.class
> imagery/i.ortho.photo/photo.2target
> imagery/i.ortho.photo/photo.2image
> imagery/i.points
> imagery/i.vpoints
>
> All of them have this error (I dunno how to fix that):
> zoom_box.c:5: error: 'y1' redeclared as different kind of symbol
> zoom_box.c:5: error: 'y1' redeclared as different kind of symbol

Several options:

1. Don't include <math.h> from gis.h, and unconditionally redefine
M_PI, i.e.

  #undef M_PI
  #define M_PI ...

rather than:

  #ifdef M_PI
  #define M_PI ...
  #endif

I have implemented this solution.
Compiles now, thanks.

Markus

On Thu, Jul 14, 2005 at 10:31:03AM +0200, Markus Neteler wrote:

On Thu, Jul 14, 2005 at 01:54:02AM +0100, Glynn Clements wrote:
> Markus Neteler wrote:
>
> > as the subject says (valid for GRASS 6.1-CVS). This hopefully
> > improves the gcc4 and Fedora4 readiness...
> >

Remaining issues are in (too complicated for me):
raster/r.kappa
raster/r.random.cells
raster/r.random.surface
raster/wildfire/r.ros
raster/wildfire/r.spread
raster/wildfire/r.spreadpath
raster3d/r3.mask
raster3d/r3.mkdspf
visualization/nviz
visualization/xganim

Markus