Re: [PATCHES] fix compile warning for pg_backup_tar.c

2004-11-28 Thread Bruce Momjian
I have added a comment explaining the possible compiler warning: /* * Some compilers with throw a warning knowing this test can never be * true because off_t can't exceed the compared maximum. */ if (th->fileLen > MAX_TAR_MEMBER_FILELEN) die_horribly(AH, modulenam

Re: [PATCHES] fix compile warning for pg_backup_tar.c

2004-11-08 Thread Andrew Dunstan
Peter Eisentraut wrote: Andrew Dunstan wrote: ISTM that what is happening here is that the compiler is smart enough to know that what is in MAX_TAR_MEMBER_FILELEN can't be exceeded by any possible value of type off_t. Yeah, I think off_t is only 32 bits there. Then using INT64_IS_BUSTED

Re: [PATCHES] fix compile warning for pg_backup_tar.c

2004-11-08 Thread Peter Eisentraut
Andrew Dunstan wrote: > ISTM that what is happening here is that the compiler is smart enough > to know that what is in MAX_TAR_MEMBER_FILELEN can't be exceeded by > any possible value of type off_t. Yeah, I think off_t is only 32 bits there. Then using INT64_IS_BUSTED as conditional is really m

Re: [PATCHES] fix compile warning for pg_backup_tar.c

2004-11-08 Thread Andrew Dunstan
Peter Eisentraut wrote: Andrew Dunstan wrote: Yet another fix for a useless compile warning. This one is slightly ugly ;-( First of all, ugly code needs to be documented in the code. Ok. Perhaps code that is expected to generate warnings should be too ;-) Then, the diff + #ifdef INT64_I

Re: [PATCHES] fix compile warning for pg_backup_tar.c

2004-11-08 Thread Peter Eisentraut
Andrew Dunstan wrote: > Yet another fix for a useless compile warning. This one is slightly > ugly ;-( First of all, ugly code needs to be documented in the code. Then, the diff + #ifdef INT64_IS_BUSTED if (th->fileLen > MAX_TAR_MEMBER_FILELEN) + #else + if (((int64) th->fileLen -1

Re: [PATCHES] fix compile warning for pg_backup_tar.c

2004-11-08 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Yet another fix for a useless compile warning. This one is slightly ugly ;-( Why not use off_t in the first place? regards, tom lane ---(end of broadcast)--- TIP 7: don't forget t

Re: [PATCHES] fix compile warning

2003-11-21 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > This patch fixes a trivial compiler warning introduced recently in > bufmgr.c Done. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send a

Re: [PATCHES] fix compile warning in pg_id

2003-08-10 Thread Bruce Momjian
Patch applied. Thanks. --- Neil Conway wrote: > I get the following warning when I compile src/bin/pg_id/pg_id.c: > > gcc -pipe -g -Wall -Wmissing-prototypes -Wmissing-declarations > -I../../../src/include -c -o pg_id.

Re: [PATCHES] fix compile warning in pg_id

2003-08-08 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --- Neil Conway wrote: > I get the following