]> jfr.im git - solanum.git/commitdiff
Fix -Wformat errors found in ircd-ratbox.
authorJilles Tjoelker <redacted>
Sat, 12 Nov 2011 23:22:09 +0000 (00:22 +0100)
committerJilles Tjoelker <redacted>
Sat, 12 Nov 2011 23:22:09 +0000 (00:22 +0100)
We cannot use -Wformat meaningfully but ircd-ratbox trunk can.

modules/core/m_join.c
modules/m_services.c
modules/m_testline.c
modules/m_topic.c
modules/m_trace.c
modules/m_users.c
src/messages.tab
src/s_user.c

index f5edea2302f1755fe9c3502dfb1d2c077617aa4f..0525452693c6694c99e7104256bf743b82785183 100644 (file)
@@ -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),
                                   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);
index 1bbc4db692bb762f6549b5cacc54e803a0b6e557..32a1622a70413735b8a404a738a2476cce45adcc 100644 (file)
@@ -330,7 +330,7 @@ h_svc_stats(hook_data_int *data)
                {
                        sendto_one_numeric(data->client, RPL_STATSULINE,
                                                form_str(RPL_STATSULINE),
-                                               ptr->data, "*", "*", "s");
+                                               (const char *)ptr->data, "*", "*", "s");
                }
        }
 }
index 05b7148b46f2146fba4e29732d98aeb4293c8778..0eb1fcb63a5ef6a702eb25c8942f605a29659ab7 100644 (file)
@@ -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),
                                        me.name, source_p->name,
                                        '!',
-                                       duration / 60,
+                                       duration / 60L,
                                        host, "Reject cache");
                if(aconf == NULL &&
                                (duration = is_throttle_ip((struct sockaddr *)&ip)))
                        sendto_one(source_p, form_str(RPL_TESTLINE),
                                        me.name, source_p->name,
                                        '!',
-                                       duration / 60,
+                                       duration / 60L,
                                        host, "Throttled");
        }
 
index 15cc4756eaf8f609fc6804faedd5922c2f8859b7..9effb2abff221562996531a75a27ba2fed3a3d5d 100644 (file)
@@ -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),
                                        me.name, source_p->name, chptr->chname,
-                                       chptr->topic_info, chptr->topic_time);
+                                       chptr->topic_info,
+                                       (unsigned long)chptr->topic_time);
                }
        }
 
index 25206e56cd8a4f2c68231bce43dd6c9bf831198b..4d273688cc5680334fe36078907e8a6dd2853802 100644 (file)
@@ -386,8 +386,8 @@ report_this_status(struct Client *source_p, struct Client *target_p)
                        sendto_one_numeric(source_p, tnumeric, form_str(tnumeric),
                                        class_name, name,
                                        show_ip(source_p, target_p) ? ip : empty_sockhost,
-                                       rb_current_time() - target_p->localClient->lasttime,
-                                       rb_current_time() - target_p->localClient->last);
+                                       (unsigned long)(rb_current_time() - target_p->localClient->lasttime),
+                                       (unsigned long)(rb_current_time() - target_p->localClient->last));
 
                        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),
                                   class_name, servcount, usercount, name,
                                   *(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++;
 
                }
@@ -411,8 +412,7 @@ report_this_status(struct Client *source_p, struct Client *target_p)
 
        default:                /* ...we actually shouldn't come here... --msa */
                sendto_one_numeric(source_p, RPL_TRACENEWTYPE, 
-                                  form_str(RPL_TRACENEWTYPE), 
-                                  me.name, source_p->name, name);
+                                  form_str(RPL_TRACENEWTYPE), name);
                cnt++;
                break;
        }
index 80b8b801d01664a9fa67c3d7a5e9027219ac07ee..32a15656d25ca04f1368043e066c1316358e221d 100644 (file)
@@ -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,
                                   form_str(RPL_LOCALUSERS),
-                                  rb_dlink_list_length(&lclient_list), 
+                                  (int)rb_dlink_list_length(&lclient_list),
                                   Count.max_loc,
-                                  rb_dlink_list_length(&lclient_list), 
+                                  (int)rb_dlink_list_length(&lclient_list),
                                   Count.max_loc);
 
                sendto_one_numeric(source_p, RPL_GLOBALUSERS, 
index 63e85207208efa7af2444a54832565538b728ee2..8e51e858edb953f56afcb26ac3363ef2b8336be0 100644 (file)
@@ -232,7 +232,7 @@ static  const char *  replies[] = {
 /* 209 RPL_TRACECLASS, */       "Class %s %d",
 /* 210 */       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",
 /* 214 RPL_STATSNLINE, */       NULL,
 /* 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",
 /* 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",
 /* 252 RPL_LUSEROP, */          "%d :IRC Operators online",
 /* 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",
 /* 256 RPL_ADMINME, */          ":Administrative info about %s",
 /* 257 RPL_ADMINLOC1, */        ":%s",
@@ -343,7 +343,7 @@ static  const char *  replies[] = {
 /* 319 RPL_WHOISCHANNELS, */    ":%s 319 %s %s :",
 /* 320 */      NULL,
 /* 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",
 /* 324 RPL_CHANNELMODEIS, */    ":%s 324 %s %s %s",
 /* 325 RPL_CHANNELMLOCKIS, */   ":%s 325 %s %s %s :is the current channel mode-lock",
index e3c7a2f2b5e3e14f9c0850eedb7804a248d97877..ce282f2e1e6014f2abfa09f6f87036d5f93024f1 100644 (file)
@@ -152,7 +152,8 @@ show_lusers(struct Client *source_p)
 
        sendto_one_numeric(source_p, RPL_LUSERCLIENT, form_str(RPL_LUSERCLIENT),
                           (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)
                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)
                sendto_one_numeric(source_p, 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)
                sendto_one_numeric(source_p, RPL_LUSERCHANNELS, 
@@ -169,14 +170,14 @@ show_lusers(struct Client *source_p)
                                   rb_dlink_list_length(&global_channel_list));
 
        sendto_one_numeric(source_p, RPL_LUSERME, form_str(RPL_LUSERME),
-                          rb_dlink_list_length(&lclient_list),
-                          rb_dlink_list_length(&serv_list));
+                          (int)rb_dlink_list_length(&lclient_list),
+                          (int)rb_dlink_list_length(&serv_list));
 
        sendto_one_numeric(source_p, RPL_LOCALUSERS, 
                           form_str(RPL_LOCALUSERS),
-                          rb_dlink_list_length(&lclient_list),
+                          (int)rb_dlink_list_length(&lclient_list),
                           Count.max_loc,
-                          rb_dlink_list_length(&lclient_list),
+                          (int)rb_dlink_list_length(&lclient_list),
                           Count.max_loc);
 
        sendto_one_numeric(source_p, RPL_GLOBALUSERS, form_str(RPL_GLOBALUSERS),