From 1f605b82ba66ece8b421b10d41094dd2e3c0c48b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 30 Dec 2022 10:59:25 +0100 Subject: Change argument of appendBinaryStringInfo from char * to void * There is some code that uses this function to assemble some kind of packed binary layout, which requires a bunch of casts because of this. Functions taking binary data plus length should take void * instead, like memcpy() for example. Discussion: https://www.postgresql.org/message-id/flat/a0086cfc-ff0f-2827-20fe-52b591d2666c%40enterprisedb.com --- src/backend/utils/adt/xid8funcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/xid8funcs.c') diff --git a/src/backend/utils/adt/xid8funcs.c b/src/backend/utils/adt/xid8funcs.c index 3baf5f7d903..15d4db4b700 100644 --- a/src/backend/utils/adt/xid8funcs.c +++ b/src/backend/utils/adt/xid8funcs.c @@ -260,7 +260,7 @@ buf_init(FullTransactionId xmin, FullTransactionId xmax) snap.nxip = 0; buf = makeStringInfo(); - appendBinaryStringInfo(buf, (char *) &snap, PG_SNAPSHOT_SIZE(0)); + appendBinaryStringInfo(buf, &snap, PG_SNAPSHOT_SIZE(0)); return buf; } @@ -272,7 +272,7 @@ buf_add_txid(StringInfo buf, FullTransactionId fxid) /* do this before possible realloc */ snap->nxip++; - appendBinaryStringInfo(buf, (char *) &fxid, sizeof(fxid)); + appendBinaryStringInfo(buf, &fxid, sizeof(fxid)); } static pg_snapshot * -- cgit v1.2.3