about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2024-04-26 14:29:28 +0200
committerAlexander Barton <alex@barton.de>2024-04-26 14:29:28 +0200
commit6cb09e4c98ee8d38b6ca80454df17f1af5167001 (patch)
treeab29b74144d7e4eb9c0be70ec45788e647959d37 /src
parente348ac04e79ae57438c755a3228306120e4aeb63 (diff)
downloadngircd-6cb09e4c98ee8d38b6ca80454df17f1af5167001.tar.gz
ngircd-6cb09e4c98ee8d38b6ca80454df17f1af5167001.zip
Explicitely cast NumConnections etc. (size_t) to "long"
This fixes the following compiler warning, for example on OpenSolaris:

  conn.c: In function 'Conn_Handler':
  conn.c:798:28: warning: format '%ld' expects argument of type 'long int',
    but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index b7838ea8..68a901d0 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -796,10 +796,10 @@ Conn_Handler(void)
 			/* Send the current status to the service manager. */
 			snprintf(status, sizeof(status),
 				 "WATCHDOG=1\nSTATUS=%ld connection%s established (%ld user%s, %ld server%s), %ld maximum. %ld accepted in total.\n",
-				 NumConnections, NumConnections == 1 ? "" : "s",
+				 (long)NumConnections, NumConnections == 1 ? "" : "s",
 				 Client_MyUserCount(), Client_MyUserCount() == 1 ? "" : "s",
 				 Client_MyServerCount(), Client_MyServerCount() == 1 ? "" : "s",
-				 NumConnectionsMax, NumConnectionsAccepted);
+				 (long)NumConnectionsMax, (long)NumConnectionsAccepted);
 			Signal_NotifySvcMgr(status);
 			notify_t = t;
 		}