[GRASS5] fixed lot's of compiler warnings

Glynn Clements glynn at gclements.plus.com
Wed Jul 13 20:54:02 EDT 2005


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 at gclements.plus.com>




More information about the grass-dev mailing list