Thread: warnings in info.c

warnings in info.c

From
Karol Szkudlarek
Date:
Hi!

I've looked at the warnings in info.c. The reason
of the warnings was macro NULL_IF_NULL defined in info.c:49.

I added cast like the following:

diff -r1.108 info.c
49c49
< #define       NULL_IF_NULL(a) (a ? a : "(NULL)")
---
 > #define       NULL_IF_NULL(a) ((a) ? (const char*)(a) : "(NULL)")


Consider whether is correct.

Greets, Karol

ps.

I checked warnings on both 32 and 64 arch.
49c49
< #define    NULL_IF_NULL(a) ((a) ? (const char*)(a) : "(NULL)")
---
> #define    NULL_IF_NULL(a) (a ? a : "(NULL)")

Re: warnings in info.c

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Karol Szkudlarek
> Sent: 06 July 2004 18:51
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] warnings in info.c
>
> Hi!
>
> I've looked at the warnings in info.c. The reason of the
> warnings was macro NULL_IF_NULL defined in info.c:49.

Looks OK to me - patch applied, thanks!

I also removed an unused variable which gets rid of another warning...

Regards, Dave