[GRASS5] Re: 5.0.3 release candidate 1
Glynn Clements
glynn.clements at virgin.net
Thu Sep 4 18:04:07 EDT 2003
Markus Neteler wrote:
> > > > ps -- can anything be done to get rid of all the
> > > > src/include/gis.h:35: warning: `GRASS_copyright' defined but not used
> > > > warnings?
> >
> > For gcc, use the "unused" attribute:
> >
> > #ifndef __GNUC__
> > #define __attribute__(x)
> > #endif
> >
> > ...
> >
> > static const char *GRASS_copyright = "GRASS GNU GPL licensed Software"
> > __attribute__((unused)) ;
>
> Will you apply this to CVS?
Committed to HEAD; given that this merely suppresses warnings, I'm not
sure that it should go into the release branch yet (breaking gis.h
would break absolutely everything).
For good measure, I've also added:
__attribute__((format(printf,1,2)))
to the declarations of G_fatal_error() and G_warning() in gisdefs.h,
so gcc will detect if the arguments don't match the specifiers in the
format string.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list