diff --git a/modules/m_stats.c b/modules/m_stats.c index 7eb0dad6..31177b71 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -1301,10 +1301,10 @@ stats_memory (struct Client *source_p) (unsigned long) users_invited_count * sizeof(rb_dlink_node)); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :User channels %u(%lu) Aways %u(%d)", + "z :User channels %u(%lu) Aways %u(%zu)", user_channels, (unsigned long) user_channels * sizeof(rb_dlink_node), - aways_counted, (int) away_memory); + aways_counted, away_memory); sendto_one_numeric(source_p, RPL_STATSDEBUG, "z :Attached confs %u(%lu)", @@ -1312,7 +1312,7 @@ stats_memory (struct Client *source_p) (unsigned long) local_client_conf_count * sizeof(rb_dlink_node)); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Conflines %u(%d)", conf_count, (int) conf_memory); + "z :Conflines %u(%zu)", conf_count, conf_memory); sendto_one_numeric(source_p, RPL_STATSDEBUG, "z :Classes %u(%lu)", @@ -1320,15 +1320,15 @@ stats_memory (struct Client *source_p) (unsigned long) class_count * sizeof(struct Class)); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Channels %u(%d)", - channel_count, (int) channel_memory); + "z :Channels %u(%zu)", + channel_count, channel_memory); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Bans %u(%d) Exceptions %u(%d) Invex %u(%d) Quiets %u(%d)", - channel_bans, (int) channel_ban_memory, - channel_except, (int) channel_except_memory, - channel_invex, (int) channel_invex_memory, - channel_quiets, (int) channel_quiet_memory); + "z :Bans %u(%zu) Exceptions %u(%zu) Invex %u(%zu) Quiets %u(%zu)", + channel_bans, channel_ban_memory, + channel_except, channel_except_memory, + channel_invex, channel_invex_memory, + channel_quiets, channel_quiet_memory); sendto_one_numeric(source_p, RPL_STATSDEBUG, "z :Channel members %u(%lu) invite %u(%lu)", @@ -1342,54 +1342,54 @@ stats_memory (struct Client *source_p) channel_users * sizeof(rb_dlink_node) + channel_invites * sizeof(rb_dlink_node); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Whowas array %ld(%ld)", - (long)ww, (long)wwm); + "z :Whowas array %zu(%zu)", + ww, wwm); totww = wwm; sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Hash: client %u(%ld) chan %u(%ld)", - U_MAX, (long)(U_MAX * sizeof(rb_dlink_list)), - CH_MAX, (long)(CH_MAX * sizeof(rb_dlink_list))); + "z :Hash: client %u(%lu) chan %u(%lu)", + U_MAX, (unsigned long)(U_MAX * sizeof(rb_dlink_list)), + CH_MAX, (unsigned long)(CH_MAX * sizeof(rb_dlink_list))); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :linebuf %ld(%ld)", - (long)linebuf_count, (long)linebuf_memory_used); + "z :linebuf %zu(%zu)", + linebuf_count, linebuf_memory_used); count_scache(&number_servers_cached, &mem_servers_cached); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :scache %ld(%ld)", - (long)number_servers_cached, (long)mem_servers_cached); + "z :scache %zu(%zu)", + number_servers_cached, mem_servers_cached); sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :hostname hash %d(%ld)", - HOST_MAX, (long)HOST_MAX * sizeof(rb_dlink_list)); + "z :hostname hash %d(%lu)", + HOST_MAX, (unsigned long)HOST_MAX * sizeof(rb_dlink_list)); total_memory = totww + total_channel_memory + conf_memory + class_count * sizeof(struct Class); total_memory += mem_servers_cached; sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Total: whowas %d channel %d conf %d", - (int) totww, (int) total_channel_memory, - (int) conf_memory); + "z :Total: whowas %zu channel %zu conf %zu", + totww, total_channel_memory, + conf_memory); count_local_client_memory(&local_client_count, &local_client_memory_used); total_memory += local_client_memory_used; sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Local client Memory in use: %ld(%ld)", - (long)local_client_count, (long)local_client_memory_used); + "z :Local client Memory in use: %zu(%zu)", + local_client_count, local_client_memory_used); count_remote_client_memory(&remote_client_count, &remote_client_memory_used); total_memory += remote_client_memory_used; sendto_one_numeric(source_p, RPL_STATSDEBUG, - "z :Remote client Memory in use: %ld(%ld)", - (long)remote_client_count, - (long)remote_client_memory_used); + "z :Remote client Memory in use: %zu(%zu)", + remote_client_count, + remote_client_memory_used); sendto_one_numeric(source_p, RPL_STATSDEBUG, "z :TOTAL: %zu",