Re: new compiler warnings

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: new compiler warnings
Date: 2011-01-27 01:16:53
Message-ID: 201101270116.p0R1Gr218517@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I can remove this warning by casting the pointer to (void *), rather
> > than (const void *) because that is what the prototype uses on my system
> > uses (libz.so.1.1.4):
>
> > ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
> > const voidp buf, unsigned len));
>
> BTW, I don't understand why that fixes it for you either. As you can
> see, gzwrite *is* declared with const. The reason why you're getting a
> warning is that zconf.h #define's const as nothing unless it thinks
> you're on an ANSI compiler (and the difference between 1.1.4 and 1.2.3
> is mostly that the former's test for ANSI-ness is brain dead). But if
> you're compiling that #define then const or lack of it should mean
> nothing to you.

Let's wait and see if anyone else complains; I have adjusted things here.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2011-01-27 01:34:46 Re: ALTER TYPE 3: add facility to identify further no-work cases
Previous Message Noah Misch 2011-01-27 01:13:54 Re: ALTER TYPE 3: add facility to identify further no-work cases