]> jfr.im git - solanum.git/commitdiff
Fix various compiler warnings.
authorJilles Tjoelker <redacted>
Sun, 20 Apr 2008 13:20:10 +0000 (15:20 +0200)
committerJilles Tjoelker <redacted>
Sun, 20 Apr 2008 13:20:10 +0000 (15:20 +0200)
12 files changed:
include/hook.h
include/irc_dictionary.h
include/s_conf.h
include/s_newconf.h
src/channel.c
src/chmode.c
src/hook.c
src/irc_dictionary.c
src/newconf.c
src/reject.c
src/res.c
src/substitution.c

index 24da17e7d6aaa395f7e7b1b8d1365ed088d9b0ce..b1bad11733fd99534ecf934b1f441541fc602394 100644 (file)
@@ -15,20 +15,20 @@ typedef struct
 
 typedef void (*hookfn) (void *data);
 
-int h_iosend_id;
-int h_iorecv_id;
-int h_iorecvctrl_id;
+extern int h_iosend_id;
+extern int h_iorecv_id;
+extern int h_iorecvctrl_id;
 
-int h_burst_client;
-int h_burst_channel;
-int h_burst_finished;
-int h_server_introduced;
-int h_server_eob;
-int h_client_exit;
-int h_umode_changed;
-int h_new_local_user;
-int h_new_remote_user;
-int h_introduce_client;
+extern int h_burst_client;
+extern int h_burst_channel;
+extern int h_burst_finished;
+extern int h_server_introduced;
+extern int h_server_eob;
+extern int h_client_exit;
+extern int h_umode_changed;
+extern int h_new_local_user;
+extern int h_new_remote_user;
+extern int h_introduce_client;
 
 void init_hook(void);
 int register_hook(const char *name);
index 5d762848d6a6e9cac62f36edcc4a02e5354be6eb..69f3babc60f64c54d6bded58ffb65605fdfc6269 100644 (file)
@@ -150,6 +150,11 @@ extern void *irc_dictionary_retrieve(struct Dictionary *dtree, const char *key);
  */
 extern void *irc_dictionary_delete(struct Dictionary *dtree, const char *key);
 
+/*
+ * irc_dictionary_size() returns the number of elements in a dictionary tree.
+ */
+extern unsigned int irc_dictionary_size(struct Dictionary *dtree);
+
 void irc_dictionary_stats(struct Dictionary *dict, void (*cb)(const char *line, void *privdata), void *privdata);
 
 #endif
index 16c4987b7eac17dd638bb229ad2bf6aedd2ab028..72e24eb45b04d62ce6712e9fd0778a7fb752153c 100644 (file)
@@ -303,7 +303,7 @@ extern struct server_info ServerInfo;       /* defined in ircd.c */
 extern struct admin_info AdminInfo;    /* defined in ircd.c */
 /* End GLOBAL section */
 
-rb_dlink_list service_list;
+extern rb_dlink_list service_list;
 
 typedef enum temp_list
 {
@@ -314,8 +314,8 @@ typedef enum temp_list
        LAST_TEMP_TYPE
 } temp_list;
 
-rb_dlink_list temp_klines[LAST_TEMP_TYPE];
-rb_dlink_list temp_dlines[LAST_TEMP_TYPE];
+extern rb_dlink_list temp_klines[LAST_TEMP_TYPE];
+extern rb_dlink_list temp_dlines[LAST_TEMP_TYPE];
 
 extern void init_s_conf(void);
 
index 9c6dbdb130e2a4bab9501f2baa1e8e8c92dd3d87..de73d859d3229ca9fa24abdcdbcca3843594d64c 100644 (file)
@@ -53,7 +53,7 @@ extern rb_dlink_list resv_conf_list;
 extern rb_dlink_list nd_list;
 extern rb_dlink_list tgchange_list;
 
-struct _rb_patricia_tree_t *tgchange_tree;
+extern struct _rb_patricia_tree_t *tgchange_tree;
 
 extern void init_s_newconf(void);
 extern void clear_s_newconf(void);
index db8d327e1d19ec0dba34a21fe8c70e8efc7ac287..5909f27521c2c797d28750951413389e4929ea57 100644 (file)
@@ -41,9 +41,6 @@
 #include "s_newconf.h"
 #include "logger.h"
 
-extern rb_dlink_list global_channel_list;
-
-extern struct config_channel_entry ConfigChannel;
 extern rb_bh *channel_heap;
 extern rb_bh *ban_heap;
 extern rb_bh *topic_heap;
index 82adf8a393a1c144b5e988bf64a90d5252ec3caa..6c3fc36f3ebb22ebd939ea0729fc97b081b44166 100644 (file)
 #define SM_ERR_RPL_Q            0x00000800
 #define SM_ERR_RPL_F            0x00001000
 
-void set_channel_mode(struct Client *, struct Client *,
-                    struct Channel *, struct membership *, int, const char **);
-
-int add_id(struct Client *source_p, struct Channel *chptr,
-                 const char *banid, rb_dlink_list * list, long mode_type);
-
 static struct ChModeChange mode_changes[BUFSIZE];
 static int mode_count;
 static int mode_limit;
 static int mask_pos;
 
-int
+static int
 get_channel_access(struct Client *source_p, struct membership *msptr)
 {
        if(!MyClient(source_p) || is_chanop(msptr))
index 5ef51f0cdf9943af88b7457efea039d0f3ead730..79a9a1078ef2d74c3d646c3be7e588a45d74af89 100644 (file)
@@ -59,6 +59,7 @@ int h_burst_finished;
 int h_server_introduced;
 int h_server_eob;
 int h_client_exit;
+int h_umode_changed;
 int h_new_local_user;
 int h_new_remote_user;
 int h_introduce_client;
index 9096790c2adfc7d7f5314b477145d2e04cc4583a..0de08b6d87c85c4dac2cc7a337641139ae4fb694 100644 (file)
@@ -203,7 +203,7 @@ irc_dictionary_get_linear_index(struct Dictionary *dict, const char *key)
  * Side Effects:
  *     - a new root node is nominated.
  */
-void
+static void
 irc_dictionary_retune(struct Dictionary *dict, const char *key)
 {
        struct DictionaryElement n, *tn, *left, *right, *node;
@@ -302,7 +302,7 @@ irc_dictionary_retune(struct Dictionary *dict, const char *key)
  * Side Effects:
  *     - a node is linked to the dictionary tree
  */
-void
+static void
 irc_dictionary_link(struct Dictionary *dict,
        struct DictionaryElement *delem)
 {
@@ -382,7 +382,7 @@ irc_dictionary_link(struct Dictionary *dict,
  * Side Effects:
  *     - the root node is unlinked from the dictionary tree
  */
-void
+static void
 irc_dictionary_unlink_root(struct Dictionary *dict)
 {
        struct DictionaryElement *delem, *nextnode, *parentofnext;
@@ -644,7 +644,7 @@ void irc_dictionary_foreach_next(struct Dictionary *dtree,
 
        if (state->cur == NULL)
        {
-               ilog(L_MAIN, "irc_dictionary_foreach_next(): called again after iteration finished on dtree<%p>", dtree);
+               ilog(L_MAIN, "irc_dictionary_foreach_next(): called again after iteration finished on dtree<%p>", (void *)dtree);
                return;
        }
 
@@ -854,7 +854,7 @@ void irc_dictionary_stats(struct Dictionary *dict, void (*cb)(const char *line,
                                dict->id, dict->count);
        else
                snprintf(str, sizeof str, "Dictionary stats for <%p> (%d)",
-                               dict, dict->count);
+                               (void *)dict, dict->count);
        cb(str, privdata);
        maxdepth = 0;
        sum = stats_recurse(dict->root, 0, &maxdepth);
index 5e72684601584b8cf4571f9a0e9ec478f0c928ad..47f956908ebc02b8159554fdbea2775739945e65 100644 (file)
@@ -1754,7 +1754,7 @@ conf_set_generic_string(void *data, int len, void *location)
        char **loc = location;
        char *input = data;
 
-       if(len && strlen(input) > len)
+       if(len && strlen(input) > (unsigned int)len)
                input[len] = '\0';
 
        rb_free(*loc);
index 9dacd40152643658df69967e83def2d1c2f1d74c..d2422a4c7d377db33c33d036bf1ba69808d95795 100644 (file)
@@ -46,8 +46,6 @@ struct reject_data
        uint32_t mask_hashv;
 };
 
-static rb_patricia_tree_t *unknown_tree;
-
 static void
 reject_exit(void *unused)
 {
index 7af69af080542a65bc7e31d81913d38f71fa8c5e..81260c8b3e752eb7387ba35e4570265dfdf5536f 100644 (file)
--- a/src/res.c
+++ b/src/res.c
@@ -99,8 +99,6 @@ static int proc_answer(struct reslist *request, HEADER * header, char *, char *)
 static struct reslist *find_id(int id);
 static struct DNSReply *make_dnsreply(struct reslist *request);
 
-extern struct rb_sockaddr_storage irc_nsaddr_list[IRCD_MAXNS];
-extern int irc_nscount;
 extern char irc_domain[HOSTLEN + 1];
 
 
index e92fae4a8e525926dcd75b2e27d798647c72b4ff..37fc3404b05586a5b13c9b15b1187f8379749bf1 100644 (file)
@@ -36,6 +36,7 @@
 #include "stdinc.h"
 #include "s_user.h"
 #include "match.h"
+#include "substitution.h"
 
 /*
  * Simple mappings for $foo -> 'bar'.