[GRASS-dev] convergence angle

Glynn Clements glynn at gclements.plus.com
Wed Oct 22 11:18:55 EDT 2008


Hamish wrote:

> > > 3) The compiler complains that arg 2 of pj_factors(, oproj.pj,) is of
> > > an incompatible pointer type. If I make it *oproj.pj it doesn't
> > > complain but the output fact.conv is always 0.00000.
> > 
> > This is a bug in GRASS' gprojects.h. It uses projPJ* where it should
> > use projPJ. projPJ is already a pointer:

> > It doesn't result in a warning in GRASS because PROJECTS_H isn't
> > defined, so the void* version is used, and implicit casts to/from
> > void* never generate a warning.
> > 
> > Your code should be using oproj.pj, not *oproj.pj.
> 
> 
> hmm, I wonder if these are still ok-
> general/g.proj/output.c:102
> general/g.region/printwindow.c:263
> general/g.region/printwindow.c:646
> lib/proj/convert.c:112
> lib/proj/convert.c:229
> raster/r.sun/main.c:490
> raster/r.sunmask/g_solposition.c:119(+)

GRASS just treats it as an opaque pointer; the fact that its type was
specified as void** when it's really void* is of no consequence.

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


More information about the grass-dev mailing list