summaryrefslogtreecommitdiff
path: root/src/backend/libpq
diff options
context:
space:
mode:
authorPeter Eisentraut2025-12-09 05:58:39 +0000
committerPeter Eisentraut2025-12-09 06:33:08 +0000
commit2b117bb014d066549c319dcd73bd538e32b0c408 (patch)
tree3241b0bd942cdcb6bbaac7b83dcb06aabb042e81 /src/backend/libpq
parent0c3c5c3b06a37c13a811ea93044202e06523b705 (diff)
Remove unnecessary casts in printf format arguments (%zu/%zd)
Many of these are probably left over from before use of %zu/%zd was portable. Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/07fa29f9-42d7-4aac-8834-197918cbbab6%40eisentraut.org
Diffstat (limited to 'src/backend/libpq')
-rw-r--r--src/backend/libpq/auth.c12
-rw-r--r--src/backend/libpq/pqcomm.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 5854a2433bb..a9181cde87b 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -998,8 +998,8 @@ pg_GSS_recvauth(Port *port)
gbuf.length = buf.len;
gbuf.value = buf.data;
- elog(DEBUG4, "processing received GSS token of length %u",
- (unsigned int) gbuf.length);
+ elog(DEBUG4, "processing received GSS token of length %zu",
+ gbuf.length);
maj_stat = gss_accept_sec_context(&min_stat,
&port->gss->ctx,
@@ -1017,9 +1017,9 @@ pg_GSS_recvauth(Port *port)
pfree(buf.data);
elog(DEBUG5, "gss_accept_sec_context major: %u, "
- "minor: %u, outlen: %u, outflags: %x",
+ "minor: %u, outlen: %zu, outflags: %x",
maj_stat, min_stat,
- (unsigned int) port->gss->outbuf.length, gflags);
+ port->gss->outbuf.length, gflags);
CHECK_FOR_INTERRUPTS();
@@ -1034,8 +1034,8 @@ pg_GSS_recvauth(Port *port)
/*
* Negotiation generated data to be sent to the client.
*/
- elog(DEBUG4, "sending GSS response token of length %u",
- (unsigned int) port->gss->outbuf.length);
+ elog(DEBUG4, "sending GSS response token of length %zu",
+ port->gss->outbuf.length);
sendAuthRequest(port, AUTH_REQ_GSS_CONT,
port->gss->outbuf.value, port->gss->outbuf.length);
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 25f739a6a17..77b62edafb7 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -454,9 +454,9 @@ ListenServerPort(int family, const char *hostName, unsigned short portNumber,
if (strlen(unixSocketPath) >= UNIXSOCK_PATH_BUFLEN)
{
ereport(LOG,
- (errmsg("Unix-domain socket path \"%s\" is too long (maximum %d bytes)",
+ (errmsg("Unix-domain socket path \"%s\" is too long (maximum %zu bytes)",
unixSocketPath,
- (int) (UNIXSOCK_PATH_BUFLEN - 1))));
+ (UNIXSOCK_PATH_BUFLEN - 1))));
return STATUS_ERROR;
}
if (Lock_AF_UNIX(unixSocketDir, unixSocketPath) != STATUS_OK)