[postgis-users] Problem compiling postgis 1.1.3

Michael Fuhr mike at fuhr.org
Thu Sep 7 10:33:41 PDT 2006


On Thu, Sep 07, 2006 at 07:05:31PM +0200, strk at refractions.net wrote:
> On Thu, Sep 07, 2006 at 07:02:47PM +0200, strk at refractions.net wrote:
> > On Thu, Sep 07, 2006 at 06:34:44PM +0200, Carles Rubio wrote:
> > 
> > > lwgeom_chip.c:714: parse error before `p'
> > > lwgeom_chip.c:723: `p' undeclared (first use in this function)
> > 
> > Please try moving the PIXEL line on top of the function.
> 
> I  committed  a fix for this. Please try with current trunk
> so you can help fixing other similar cases (new compilers don't
> warn about this - hints on compiler flags welcome)

For gcc, -pedantic should complain about this with "warning: ISO
C90 forbids mixed declarations and code", at least in some versions
(I tested 3.4.2 and 3.4.4).  However, -pedantic will also warn about
other things that PostGIS might not care about.  A more specific
flag is -Wdeclaration-after-statement, which I don't see in the
manual page but that I found in the gcc source code.

Looks like a few other places should be fixed:

lwgeom_chip.c:714: warning: ISO C90 forbids mixed declarations and code
lwgeom_chip.c:1103: warning: ISO C90 forbids mixed declarations and code
lwgeom_dump.c:280: warning: ISO C90 forbids mixed declarations and code

-- 
Michael Fuhr



More information about the postgis-users mailing list