Fix various compiler warnings.

This commit is contained in:
Jilles Tjoelker 2008-04-20 15:20:10 +02:00
parent 9eea5de11d
commit 2e819b6b3e
12 changed files with 31 additions and 37 deletions

View 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);

View 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

View 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);

View 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);

View 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;

View file

@ -57,18 +57,12 @@
#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))

View 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;

View 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);

View 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);

View 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)
{

View file

@ -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];

View file

@ -36,6 +36,7 @@
#include "stdinc.h"
#include "s_user.h"
#include "match.h"
#include "substitution.h"
/*
* Simple mappings for $foo -> 'bar'.