From: Bruce Momjian Date: Mon, 29 Nov 2004 03:01:54 +0000 (+0000) Subject: Add comment explaining possible compiler warning: X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d3483134158fe6ad42a04d6e56392bbf2851d356;p=users%2Fbernd%2Fpostgres.git Add comment explaining 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, modulename, "archive member too large for tar format\n"); --- diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c index 1b009fa4b6..0b8860cf1b 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -1019,6 +1019,10 @@ _tarAddFile(ArchiveHandle *AH, TAR_MEMBER *th) */ fseeko(tmp, 0, SEEK_END); th->fileLen = ftello(tmp); + /* + * 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, modulename, "archive member too large for tar format\n"); fseeko(tmp, 0, SEEK_SET);