Skip to content

Commit

Permalink
Explicitely cast NumConnections etc. (size_t) to "long"
Browse files Browse the repository at this point in the history
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=]
  • Loading branch information
alexbarton committed Apr 26, 2024
1 parent e348ac0 commit 6cb09e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ngircd/conn.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6cb09e4

Please sign in to comment.