Add comment explaining possible compiler warning:
authorBruce Momjian <[email protected]>
Mon, 29 Nov 2004 03:01:54 +0000 (03:01 +0000)
committerBruce Momjian <[email protected]>
Mon, 29 Nov 2004 03:01:54 +0000 (03:01 +0000)
    /*
     *  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");

src/bin/pg_dump/pg_backup_tar.c

index 1b009fa4b6cbfa2077eef925e22e3102062c1762..0b8860cf1b36af3b76403ae41fcdf18830f35e85 100644 (file)
@@ -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);