Fix -Wformat errors found in ircd-ratbox.
We cannot use -Wformat meaningfully but ircd-ratbox trunk can.
This commit is contained in:
parent
a695b0e40e
commit
0cce01d388
8 changed files with 25 additions and 22 deletions
|
@ -363,7 +363,8 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
|
||||||
|
|
||||||
sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
|
sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
|
||||||
me.name, source_p->name, chptr->chname,
|
me.name, source_p->name, chptr->chname,
|
||||||
chptr->topic_info, chptr->topic_time);
|
chptr->topic_info,
|
||||||
|
(unsigned long)chptr->topic_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
channel_member_names(chptr, source_p, 1);
|
channel_member_names(chptr, source_p, 1);
|
||||||
|
|
|
@ -330,7 +330,7 @@ h_svc_stats(hook_data_int *data)
|
||||||
{
|
{
|
||||||
sendto_one_numeric(data->client, RPL_STATSULINE,
|
sendto_one_numeric(data->client, RPL_STATSULINE,
|
||||||
form_str(RPL_STATSULINE),
|
form_str(RPL_STATSULINE),
|
||||||
ptr->data, "*", "*", "s");
|
(const char *)ptr->data, "*", "*", "s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,14 +149,14 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
|
||||||
sendto_one(source_p, form_str(RPL_TESTLINE),
|
sendto_one(source_p, form_str(RPL_TESTLINE),
|
||||||
me.name, source_p->name,
|
me.name, source_p->name,
|
||||||
'!',
|
'!',
|
||||||
duration / 60,
|
duration / 60L,
|
||||||
host, "Reject cache");
|
host, "Reject cache");
|
||||||
if(aconf == NULL &&
|
if(aconf == NULL &&
|
||||||
(duration = is_throttle_ip((struct sockaddr *)&ip)))
|
(duration = is_throttle_ip((struct sockaddr *)&ip)))
|
||||||
sendto_one(source_p, form_str(RPL_TESTLINE),
|
sendto_one(source_p, form_str(RPL_TESTLINE),
|
||||||
me.name, source_p->name,
|
me.name, source_p->name,
|
||||||
'!',
|
'!',
|
||||||
duration / 60,
|
duration / 60L,
|
||||||
host, "Throttled");
|
host, "Throttled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,8 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char *
|
||||||
|
|
||||||
sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
|
sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
|
||||||
me.name, source_p->name, chptr->chname,
|
me.name, source_p->name, chptr->chname,
|
||||||
chptr->topic_info, chptr->topic_time);
|
chptr->topic_info,
|
||||||
|
(unsigned long)chptr->topic_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -386,8 +386,8 @@ report_this_status(struct Client *source_p, struct Client *target_p)
|
||||||
sendto_one_numeric(source_p, tnumeric, form_str(tnumeric),
|
sendto_one_numeric(source_p, tnumeric, form_str(tnumeric),
|
||||||
class_name, name,
|
class_name, name,
|
||||||
show_ip(source_p, target_p) ? ip : empty_sockhost,
|
show_ip(source_p, target_p) ? ip : empty_sockhost,
|
||||||
rb_current_time() - target_p->localClient->lasttime,
|
(unsigned long)(rb_current_time() - target_p->localClient->lasttime),
|
||||||
rb_current_time() - target_p->localClient->last);
|
(unsigned long)(rb_current_time() - target_p->localClient->last));
|
||||||
|
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,8 @@ report_this_status(struct Client *source_p, struct Client *target_p)
|
||||||
sendto_one_numeric(source_p, RPL_TRACESERVER, form_str(RPL_TRACESERVER),
|
sendto_one_numeric(source_p, RPL_TRACESERVER, form_str(RPL_TRACESERVER),
|
||||||
class_name, servcount, usercount, name,
|
class_name, servcount, usercount, name,
|
||||||
*(target_p->serv->by) ? target_p->serv->by : "*", "*",
|
*(target_p->serv->by) ? target_p->serv->by : "*", "*",
|
||||||
me.name, rb_current_time() - target_p->localClient->lasttime);
|
me.name,
|
||||||
|
(unsigned long)(rb_current_time() - target_p->localClient->lasttime));
|
||||||
cnt++;
|
cnt++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -411,8 +412,7 @@ report_this_status(struct Client *source_p, struct Client *target_p)
|
||||||
|
|
||||||
default: /* ...we actually shouldn't come here... --msa */
|
default: /* ...we actually shouldn't come here... --msa */
|
||||||
sendto_one_numeric(source_p, RPL_TRACENEWTYPE,
|
sendto_one_numeric(source_p, RPL_TRACENEWTYPE,
|
||||||
form_str(RPL_TRACENEWTYPE),
|
form_str(RPL_TRACENEWTYPE), name);
|
||||||
me.name, source_p->name, name);
|
|
||||||
cnt++;
|
cnt++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,9 +56,9 @@ m_users(struct Client *client_p, struct Client *source_p, int parc, const char *
|
||||||
{
|
{
|
||||||
sendto_one_numeric(source_p, RPL_LOCALUSERS,
|
sendto_one_numeric(source_p, RPL_LOCALUSERS,
|
||||||
form_str(RPL_LOCALUSERS),
|
form_str(RPL_LOCALUSERS),
|
||||||
rb_dlink_list_length(&lclient_list),
|
(int)rb_dlink_list_length(&lclient_list),
|
||||||
Count.max_loc,
|
Count.max_loc,
|
||||||
rb_dlink_list_length(&lclient_list),
|
(int)rb_dlink_list_length(&lclient_list),
|
||||||
Count.max_loc);
|
Count.max_loc);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_GLOBALUSERS,
|
sendto_one_numeric(source_p, RPL_GLOBALUSERS,
|
||||||
|
|
|
@ -232,7 +232,7 @@ static const char * replies[] = {
|
||||||
/* 209 RPL_TRACECLASS, */ "Class %s %d",
|
/* 209 RPL_TRACECLASS, */ "Class %s %d",
|
||||||
/* 210 */ NULL,
|
/* 210 */ NULL,
|
||||||
/* 211 RPL_STATSLINKINFO, */ NULL,
|
/* 211 RPL_STATSLINKINFO, */ NULL,
|
||||||
/* 212 RPL_STATSCOMMANDS, */ "%s %u %u :%u",
|
/* 212 RPL_STATSCOMMANDS, */ "%s %u %lu :%u",
|
||||||
/* 213 RPL_STATSCLINE, */ "C %s %s %s %d %s",
|
/* 213 RPL_STATSCLINE, */ "C %s %s %s %d %s",
|
||||||
/* 214 RPL_STATSNLINE, */ NULL,
|
/* 214 RPL_STATSNLINE, */ NULL,
|
||||||
/* 215 RPL_STATSILINE, */ "I %s %s %s@%s %d %s",
|
/* 215 RPL_STATSILINE, */ "I %s %s %s@%s %d %s",
|
||||||
|
@ -271,11 +271,11 @@ static const char * replies[] = {
|
||||||
|
|
||||||
/* 248 RPL_STATSULINE, */ "U %s %s@%s %s",
|
/* 248 RPL_STATSULINE, */ "U %s %s@%s %s",
|
||||||
/* 249 RPL_STATSDEBUG */ NULL,
|
/* 249 RPL_STATSDEBUG */ NULL,
|
||||||
/* 250 RPL_STATSCONN, */ ":Highest connection count: %d (%d clients) (%d connections received)",
|
/* 250 RPL_STATSCONN, */ ":Highest connection count: %d (%d clients) (%lu connections received)",
|
||||||
/* 251 RPL_LUSERCLIENT, */ ":There are %d users and %d invisible on %d servers",
|
/* 251 RPL_LUSERCLIENT, */ ":There are %d users and %d invisible on %d servers",
|
||||||
/* 252 RPL_LUSEROP, */ "%d :IRC Operators online",
|
/* 252 RPL_LUSEROP, */ "%d :IRC Operators online",
|
||||||
/* 253 RPL_LUSERUNKNOWN, */ "%d :unknown connection(s)",
|
/* 253 RPL_LUSERUNKNOWN, */ "%d :unknown connection(s)",
|
||||||
/* 254 RPL_LUSERCHANNELS, */ "%d :channels formed",
|
/* 254 RPL_LUSERCHANNELS, */ "%lu :channels formed",
|
||||||
/* 255 RPL_LUSERME, */ ":I have %d clients and %d servers",
|
/* 255 RPL_LUSERME, */ ":I have %d clients and %d servers",
|
||||||
/* 256 RPL_ADMINME, */ ":Administrative info about %s",
|
/* 256 RPL_ADMINME, */ ":Administrative info about %s",
|
||||||
/* 257 RPL_ADMINLOC1, */ ":%s",
|
/* 257 RPL_ADMINLOC1, */ ":%s",
|
||||||
|
@ -343,7 +343,7 @@ static const char * replies[] = {
|
||||||
/* 319 RPL_WHOISCHANNELS, */ ":%s 319 %s %s :",
|
/* 319 RPL_WHOISCHANNELS, */ ":%s 319 %s %s :",
|
||||||
/* 320 */ NULL,
|
/* 320 */ NULL,
|
||||||
/* 321 RPL_LISTSTART, */ ":%s 321 %s Channel :Users Name",
|
/* 321 RPL_LISTSTART, */ ":%s 321 %s Channel :Users Name",
|
||||||
/* 322 RPL_LIST, */ ":%s 322 %s %s%s %d :%s",
|
/* 322 RPL_LIST, */ ":%s 322 %s %s%s %lu :%s",
|
||||||
/* 323 RPL_LISTEND, */ ":%s 323 %s :End of /LIST",
|
/* 323 RPL_LISTEND, */ ":%s 323 %s :End of /LIST",
|
||||||
/* 324 RPL_CHANNELMODEIS, */ ":%s 324 %s %s %s",
|
/* 324 RPL_CHANNELMODEIS, */ ":%s 324 %s %s %s",
|
||||||
/* 325 RPL_CHANNELMLOCKIS, */ ":%s 325 %s %s %s :is the current channel mode-lock",
|
/* 325 RPL_CHANNELMLOCKIS, */ ":%s 325 %s %s %s :is the current channel mode-lock",
|
||||||
|
|
13
src/s_user.c
13
src/s_user.c
|
@ -152,7 +152,8 @@ show_lusers(struct Client *source_p)
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_LUSERCLIENT, form_str(RPL_LUSERCLIENT),
|
sendto_one_numeric(source_p, RPL_LUSERCLIENT, form_str(RPL_LUSERCLIENT),
|
||||||
(Count.total - Count.invisi),
|
(Count.total - Count.invisi),
|
||||||
Count.invisi, rb_dlink_list_length(&global_serv_list));
|
Count.invisi,
|
||||||
|
(int)rb_dlink_list_length(&global_serv_list));
|
||||||
|
|
||||||
if(rb_dlink_list_length(&oper_list) > 0)
|
if(rb_dlink_list_length(&oper_list) > 0)
|
||||||
sendto_one_numeric(source_p, RPL_LUSEROP,
|
sendto_one_numeric(source_p, RPL_LUSEROP,
|
||||||
|
@ -161,7 +162,7 @@ show_lusers(struct Client *source_p)
|
||||||
if(rb_dlink_list_length(&unknown_list) > 0)
|
if(rb_dlink_list_length(&unknown_list) > 0)
|
||||||
sendto_one_numeric(source_p, RPL_LUSERUNKNOWN,
|
sendto_one_numeric(source_p, RPL_LUSERUNKNOWN,
|
||||||
form_str(RPL_LUSERUNKNOWN),
|
form_str(RPL_LUSERUNKNOWN),
|
||||||
rb_dlink_list_length(&unknown_list));
|
(int)rb_dlink_list_length(&unknown_list));
|
||||||
|
|
||||||
if(rb_dlink_list_length(&global_channel_list) > 0)
|
if(rb_dlink_list_length(&global_channel_list) > 0)
|
||||||
sendto_one_numeric(source_p, RPL_LUSERCHANNELS,
|
sendto_one_numeric(source_p, RPL_LUSERCHANNELS,
|
||||||
|
@ -169,14 +170,14 @@ show_lusers(struct Client *source_p)
|
||||||
rb_dlink_list_length(&global_channel_list));
|
rb_dlink_list_length(&global_channel_list));
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_LUSERME, form_str(RPL_LUSERME),
|
sendto_one_numeric(source_p, RPL_LUSERME, form_str(RPL_LUSERME),
|
||||||
rb_dlink_list_length(&lclient_list),
|
(int)rb_dlink_list_length(&lclient_list),
|
||||||
rb_dlink_list_length(&serv_list));
|
(int)rb_dlink_list_length(&serv_list));
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_LOCALUSERS,
|
sendto_one_numeric(source_p, RPL_LOCALUSERS,
|
||||||
form_str(RPL_LOCALUSERS),
|
form_str(RPL_LOCALUSERS),
|
||||||
rb_dlink_list_length(&lclient_list),
|
(int)rb_dlink_list_length(&lclient_list),
|
||||||
Count.max_loc,
|
Count.max_loc,
|
||||||
rb_dlink_list_length(&lclient_list),
|
(int)rb_dlink_list_length(&lclient_list),
|
||||||
Count.max_loc);
|
Count.max_loc);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_GLOBALUSERS, form_str(RPL_GLOBALUSERS),
|
sendto_one_numeric(source_p, RPL_GLOBALUSERS, form_str(RPL_GLOBALUSERS),
|
||||||
|
|
Loading…
Reference in a new issue