summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2004-11-29 03:01:54 +0000
committerBruce Momjian2004-11-29 03:01:54 +0000
commit55481228299eee3cfb1ea5097ddd5558bea5382e (patch)
tree7d3fc78bcbfb5a2b14cec14e72bd85761c64343a
parenteeed2274e59c9a4f43839567716858978e384944 (diff)
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");
-rw-r--r--src/bin/pg_dump/pg_backup_tar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index 61eeb6d06db..97b5c3576e3 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -16,7 +16,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.45 2004/10/07 15:21:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.46 2004/11/29 03:01:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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);