Re: Compiler warnings in psqloodbc 08.03.0200

From: Zoltan Boszormenyi <zb(at)cybertec(dot)at>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, pgsql-odbc(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>
Subject: Re: Compiler warnings in psqloodbc 08.03.0200
Date: 2008-11-11 19:43:44
Message-ID: 4919E070.9040601@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hiroshi Inoue írta:
> Zoltan Boszormenyi wrote:
>> Hiroshi Inoue írta:
>>> Zoltan Boszormenyi wrote:
>>>> Hi,
>>>>
>>>> here's the fix for all non-pointer-signedness warnings,
>>>> against 08.03.0300 that was released meanwhile. Now
>>>> the compilation only emits 246 "differ in signedness"
>>>> warnings, which is still too much noise. I agree with
>>>> Tom Lane that those should be cleaned up if for nothing
>>>> else, than the real bugs don't get lost in the noise.
>
> I forgot to mention that I don't think it's very nice
> to remove all the warnings.

Sorry to refresh such an old thread, but I just got a choice
to build psqlODBC on Solaris10/Sparc with sunw cc instead
of gcc. I get tons of warnings like this:

"environ.c", line 325: warning: argument #3 is incompatible with prototype:
prototype: pointer to const unsigned char : "environ.c", line 113
argument : pointer to char

The cause is the same as for the "pointers differ in signedness"
under GCC. I can agree with your assertion that "it's not very nice
to remove all warnings" in the sense that using manual casts may
only cover bugs. But fixing the above warning using proper function
prototypes is still desired. A function that expects constant message
strings should declare that parameter as "char *" instead of
"unsigned char *" and it would avoid warnings like the above.

Best regards,
Zoltán Böszörményi

--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2008-11-14 11:44:10 [ psqlodbc-Bugs-1010509 ] SQLDriverconnect() failed in solaris 10 Sparc
Previous Message noreply 2008-11-11 15:05:09 [ psqlodbc-Bugs-1010508 ] win64.mak for psqlODBC on winxp 64bit