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
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
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
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
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
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
Yet another fix for a useless compile warning. This one is slightly ugly ;-(
cheers
andrew
Index: src/bin/pg_dump/pg_backup_tar.c
===
RCS file: /home/cvsmirror/pgsql/src/bin/pg_dump/pg_backup_tar.c,v
retrieving revision 1.45
diff -c -
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
This patch fixes a trivial compiler warning introduced recently in
bufmgr.c
-Neil
Index: src/backend/storage/buffer/bufmgr.c
===
RCS file: /var/lib/cvs/pgsql-server/src/backend/storage/buffer/bufmgr.c,v
retrieving revision 1.145
diff
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.o pg_id.c -MMD
pg_id.c: In function `main':
pg_id.c:35: warning: unused variable `optarg'
The attached trivial patch fixes the war
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.
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
12 matches
Mail list logo