summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-01-18 19:21:39 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-01-18 19:21:39 +0000
commitc2a2c00a42d709f75349e9dbfa114848202342d8 (patch)
tree01009417efea887717c5e15e66bfd852da888e33
parentc6f79bc103609f23c53d789d1b725251a41740ee (diff)
- Fixed some other invalid conversion specifiers
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1761 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r--include/log.h2
-rw-r--r--include/send.h31
-rw-r--r--include/stdinc.h6
-rw-r--r--modules/m_dline.c2
-rw-r--r--modules/m_stats.c4
-rw-r--r--src/send.c2
6 files changed, 27 insertions, 20 deletions
diff --git a/include/log.h b/include/log.h
index 3467e51..76e0767 100644
--- a/include/log.h
+++ b/include/log.h
@@ -41,6 +41,6 @@ enum log_type {
extern int log_add_file(enum log_type, size_t, const char *);
extern void log_close_all(void);
-extern void ilog(enum log_type, const char *, ...);
+extern void ilog(enum log_type, const char *, ...) AFP(2,3);
#endif /* INCLUDED_s_log_h */
diff --git a/include/send.h b/include/send.h
index e885e77..668428b 100644
--- a/include/send.h
+++ b/include/send.h
@@ -27,6 +27,7 @@
#include "fdlist.h"
+
/*
* struct decls
*/
@@ -43,38 +44,38 @@ extern struct Callback *iosend_cb;
extern void sendq_unblocked(fde_t *, struct Client *);
extern void send_queued_write(struct Client *);
extern void send_queued_all(void);
-extern void sendto_one(struct Client *, const char *, ...);
+extern void sendto_one(struct Client *, const char *, ...) AFP(2,3);
extern void sendto_channel_butone(struct Client *, struct Client *,
struct Channel *, unsigned int,
- const char *, ...);
+ const char *, ...) AFP(5,6);
extern void sendto_common_channels_local(struct Client *, int, unsigned int,
- const char *, ...);
+ const char *, ...) AFP(4,5);
extern void sendto_channel_local(int, int, struct Channel *,
- const char *, ...);
+ const char *, ...) AFP(4,5);
extern void sendto_channel_local_butone(struct Client *, int, unsigned int, struct Channel *,
- const char *, ...);
+ const char *, ...) AFP(5,6);
extern void sendto_channel_remote(struct Client *, struct Client *, int,
const unsigned int, const unsigned int,
- struct Channel *, const char *, ...);
+ struct Channel *, const char *, ...) AFP(7,8);
extern void sendto_server(struct Client *,
const unsigned int,
- const unsigned int, const char *, ...);
+ const unsigned int, const char *, ...) AFP(4,5);
extern void sendto_match_butone(struct Client *, struct Client *,
- char *, int, const char *, ...);
+ char *, int, const char *, ...) AFP(5,6);
extern void sendto_match_servs(struct Client *, const char *, int,
- const char *, ...);
+ const char *, ...) AFP(4,5);
extern void sendto_realops_flags(unsigned int, int, int,
- const char *, ...);
+ const char *, ...) AFP(4,5);
extern void sendto_wallops_flags(unsigned int, struct Client *,
- const char *, ...);
-extern void ts_warn(const char *, ...);
+ const char *, ...) AFP(3,4);
+extern void ts_warn(const char *, ...) AFP(1,2);
extern void sendto_anywhere(struct Client *, struct Client *,
- const char *, ...);
+ const char *, ...) AFP(3,4);
extern void kill_client(struct Client *, struct Client *,
- const char *, ... );
+ const char *, ... ) AFP(3,4);
extern void kill_client_ll_serv_butone(struct Client *, struct Client *,
- const char *, ...);
+ const char *, ...) AFP(3,4);
#define ALL_MEMBERS 0
diff --git a/include/stdinc.h b/include/stdinc.h
index 288f4da..4596f8a 100644
--- a/include/stdinc.h
+++ b/include/stdinc.h
@@ -93,4 +93,10 @@
#define HYB_PATH_MAX 4096
#endif
+#if 0 && __GNUC__
+#define AFP(a,b) __attribute__((format (printf, a, b)))
+#else
+#define AFP(a,b)
+#endif
+
#endif
diff --git a/modules/m_dline.c b/modules/m_dline.c
index b91bf23..c2b3177 100644
--- a/modules/m_dline.c
+++ b/modules/m_dline.c
@@ -498,7 +498,7 @@ ms_undline(struct Client *client_p, struct Client *source_p,
return;
sendto_match_servs(source_p, parv[1], CAP_UNDLN,
- "UNDLINE %s %s %s",
+ "UNDLINE %s %s",
parv[1], parv[2]);
me_undline(client_p, source_p, parc, parv);
diff --git a/modules/m_stats.c b/modules/m_stats.c
index 77b8d2c..9f144ea 100644
--- a/modules/m_stats.c
+++ b/modules/m_stats.c
@@ -270,7 +270,7 @@ stats_memory(struct Client *source_p, int parc, char *parv[])
count_whowas_memory(&wwu, &wwm);
watch_count_memory(&watch_list_headers, &watch_list_memory);
- sendto_one(source_p, ":%s %d %s z :WATCH headers %u(%u) entries %d(%u)",
+ sendto_one(source_p, ":%s %d %s z :WATCH headers %u(%llu) entries %d(%u)",
me.name, RPL_STATSDEBUG, source_p->name, watch_list_headers,
watch_list_memory, watch_list_entries,
watch_list_entries * sizeof(dlink_node) * 2);
@@ -299,7 +299,7 @@ stats_memory(struct Client *source_p, int parc, char *parv[])
me.name, RPL_STATSDEBUG, source_p->name,
class_count, (unsigned long long)(class_count * sizeof(struct ClassItem)));
- sendto_one(source_p, ":%s %d %s z :Channels %uu(%llu) Topics %u(%u)",
+ sendto_one(source_p, ":%s %d %s z :Channels %u(%llu) Topics %u(%u)",
me.name, RPL_STATSDEBUG, source_p->name,
dlink_list_length(&global_channel_list),
channel_memory, topic_count, topic_count *
diff --git a/src/send.c b/src/send.c
index 1069f99..5c6e8a6 100644
--- a/src/send.c
+++ b/src/send.c
@@ -110,7 +110,7 @@ send_message(struct Client *to, char *buf, int len)
{
if (IsServer(to))
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
- "Max SendQ limit exceeded for %s: %lu > %lu",
+ "Max SendQ limit exceeded for %s: %lu > %u",
get_client_name(to, HIDE_IP),
(unsigned long)(dbuf_length(&to->localClient->buf_sendq) + len),
get_sendq(&to->localClient->confs));