1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

Add casts to suppress compiler warnings observed on Darwin platform

(surprised no one has reported these yet...)
This commit is contained in:
Tom Lane
2001-11-08 04:05:13 +00:00
parent c6e25ed1af
commit 64af43a15f
4 changed files with 19 additions and 13 deletions

View File

@@ -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;
}
}