aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-11-08 04:05:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-11-08 04:05:13 +0000
commit64af43a15f97162aa4b5a4cbdaa10f3721adf996 (patch)
tree3212964a8acb46c32615567f48302ea626fecab9 /src/bin/pg_dump/pg_backup_archiver.c
parentc6e25ed1afa75a8fe03ed1b71f522dcbd9f4bb66 (diff)
downloadpostgresql-64af43a15f97162aa4b5a4cbdaa10f3721adf996.tar.gz
postgresql-64af43a15f97162aa4b5a4cbdaa10f3721adf996.zip
Add casts to suppress compiler warnings observed on Darwin platform
(surprised no one has reported these yet...)
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 939556a5720..4c99d51bfed 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.37 2001/11/05 17:46:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.38 2001/11/08 04:05:12 tgl Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
@@ -1226,10 +1226,11 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
if (AH->writingBlob)
{
res = lo_write(AH->connection, AH->loFd, (void *) ptr, size * nmemb);
- ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n", size * nmemb, res);
- if (res < size * nmemb)
+ ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n",
+ (int) (size * nmemb), res);
+ if (res != size * nmemb)
die_horribly(AH, modulename, "could not write to large object (result: %d, expected: %d)\n",
- res, size * nmemb);
+ res, (int) (size * nmemb));
return res;
}
@@ -1260,7 +1261,8 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
{
res = fwrite((void *) ptr, size, nmemb, AH->OF);
if (res != nmemb)
- die_horribly(AH, modulename, "could not write to output file (%d != %d)\n", res, nmemb);
+ die_horribly(AH, modulename, "could not write to output file (%d != %d)\n",
+ res, (int) nmemb);
return res;
}
}