Re: Compiler warnings in psqloodbc 08.03.0200 - Mailing list pgsql-odbc

From Zoltan Boszormenyi
Subject Re: Compiler warnings in psqloodbc 08.03.0200
Date
Msg-id 4919E070.9040601@cybertec.at
Whole thread Raw
In response to Re: Compiler warnings in psqloodbc 08.03.0200  (Hiroshi Inoue <inoue@tpf.co.jp>)
List 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/


pgsql-odbc by date:

Previous
From:
Date:
Subject: [ psqlodbc-Bugs-1010508 ] win64.mak for psqlODBC on winxp 64bit
Next
From:
Date:
Subject: [ psqlodbc-Bugs-1010509 ] SQLDriverconnect() failed in solaris 10 Sparc