Skip to content

Commit 8be6847

Browse files
committed
Remove compile warnings for lo dump by casting to char *.
1 parent 71aab11 commit 8be6847

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.43 2002/04/24 02:21:04 momjian Exp $
18+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.44 2002/04/24 14:03:22 momjian Exp $
1919
*
2020
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2121
*
@@ -1249,18 +1249,18 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
12491249
int remaining = AH->lo_buf_size - AH->lo_buf_used;
12501250
int slack = nmemb * size - remaining;
12511251

1252-
memcpy(AH->lo_buf + AH->lo_buf_used, ptr, remaining);
1252+
memcpy((char *)AH->lo_buf + AH->lo_buf_used, ptr, remaining);
12531253
res = lo_write(AH->connection, AH->loFd, AH->lo_buf, AH->lo_buf_size);
12541254
ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n",
12551255
AH->lo_buf_size, res);
12561256
if (res != AH->lo_buf_size)
12571257
die_horribly(AH, modulename, "could not write to large object (result: %d, expected: %d)\n",
12581258
res, AH->lo_buf_size);
1259-
memcpy(AH->lo_buf, ptr + remaining, slack);
1259+
memcpy(AH->lo_buf, (char *)ptr + remaining, slack);
12601260
AH->lo_buf_used = slack;
12611261
} else {
12621262
/* LO Buffer is still large enough, buffer it */
1263-
memcpy(AH->lo_buf + AH->lo_buf_used, ptr, size * nmemb);
1263+
memcpy((char *)AH->lo_buf + AH->lo_buf_used, ptr, size * nmemb);
12641264
AH->lo_buf_used += size * nmemb;
12651265
}
12661266

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy