1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 19:13:14 +02:00

fixed -Wall warnings

This commit is contained in:
codemastr
2000-09-08 21:58:11 +00:00
parent 978dd4071e
commit 6a356f7e2d
20 changed files with 40 additions and 43 deletions
+2
View File
@@ -620,3 +620,5 @@
- When you set -I which on a chan it sends a JOIN to the rest of the channel
- Net/TechAdmins now receive a JOIN/PART when you JOIN/PART a channel
- Net/TechAdmins can now see +I users in /names
- Fixed a typo in s_err.c reported by TRON
- Fixed more -Wall warnings
+10
View File
@@ -20,6 +20,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef proto_h
#define proto_h
/* badwords.c */
int loadbadwords_message PROTO((char *wordfile));
int loadbadwords_channel PROTO((char *wordfile));
@@ -50,6 +52,7 @@ void sendto_chanops_butone PROTO((aClient *one, aChannel *chptr, char *pattern,
void sendto_realops PROTO((char *pattern, ...));
void sendto_serv_butone_token PROTO((aClient *one, char *prefix, char *command, char *token, char *pattern, ...));
void sendto_serv_butone_token_opt PROTO((aClient *one, int opt, char *prefix, char *command, char *token, char *pattern, ...));
void sendto_channel_ntadmins PROTO((aClient *from, aChannel *chptr, char *pattern, ...));
/* support.c */
char *my_itoa PROTO((int i));
@@ -85,5 +88,12 @@ void unrealmanual PROTO((void));
int check_for_target_limit PROTO((aClient *sptr, void *target, const char *name));
void make_umodestr PROTO((void));
/* webtv.c */
int is_halfop PROTO((aClient *cptr, aChannel *chptr));
int is_chanprot PROTO((aClient *cptr, aChannel *chptr));
char *convert_time PROTO((time_t ltime));
char *get_mode_str PROTO((aClient *acptr));
/* whowas.c */
void initwhowas PROTO((void));
#endif /* proto_h */
+7 -38
View File
@@ -47,6 +47,7 @@
#include "hash.h" /* For CHANNELHASHSIZE */
#include "h.h"
#include "proto.h"
#include <string.h>
ID_Copyright
("(C) 1990 University of Oulu, Computing Center and Jarkko Oikarinen");
@@ -81,7 +82,6 @@ static int channel_link PROTO((aClient *, aClient *, int, char **));
static void channel_modes PROTO((aClient *, char *, char *, aChannel *));
static int check_channelmask PROTO((aClient *, aClient *, char *));
static int del_banid PROTO((aChannel *, char *));
static int find_banid PROTO((aChannel *, char *));
static void set_mode PROTO((aChannel *, aClient *, int, char **, u_int *,
char[MAXMODEPARAMS][MODEBUFLEN + 3], int));
static void make_mode_str PROTO((aChannel *, long, long, int,
@@ -307,22 +307,6 @@ static int del_exbanid(chptr, banid)
return -1;
}
/*
* find_banid - Find an exact match for a exban
*/
static int find_exbanid(chptr, banid)
aChannel *chptr;
char *banid;
{
Ban **ban;
if (!banid)
return -1;
for (ban = &(chptr->exlist); *ban; ban = &((*ban)->next))
if (!mycmp(banid, (*ban)->banstr))
return 1;
return 0;
}
/*
@@ -397,22 +381,6 @@ static int del_banid(chptr, banid)
return -1;
}
/*
* find_banid - Find an exact match for a ban
*/
static int find_banid(chptr, banid)
aChannel *chptr;
char *banid;
{
Ban **ban;
if (!banid)
return -1;
for (ban = &(chptr->banlist); *ban; ban = &((*ban)->next))
if (!mycmp(banid, (*ban)->banstr))
return 1;
return 0;
}
/*
* IsMember - returns 1 if a person is joined
@@ -564,7 +532,7 @@ int is_chan_op(cptr, chptr)
Link *lp;
/* chanop/halfop ? */
if (chptr)
if (lp = find_user_link(chptr->members, cptr))
if ((lp = find_user_link(chptr->members, cptr)))
return ((lp->flags & CHFL_CHANOP));
return 0;
@@ -601,7 +569,7 @@ int is_halfop(cptr, chptr)
Link *lp;
if (chptr)
if (lp = find_user_link(chptr->members, cptr))
if ((lp = find_user_link(chptr->members, cptr)))
if (!is_chan_op(cptr, chptr)) /* excessive but needed */
return (lp->flags & CHFL_HALFOP);
@@ -615,7 +583,7 @@ int is_chanowner(cptr, chptr)
Link *lp;
if (chptr)
if (lp = find_user_link(chptr->members, cptr))
if ((lp = find_user_link(chptr->members, cptr)))
return (lp->flags & CHFL_CHANOWNER);
return 0;
@@ -628,7 +596,7 @@ int is_chanprot(cptr, chptr)
Link *lp;
if (chptr)
if (lp = find_user_link(chptr->members, cptr))
if ((lp = find_user_link(chptr->members, cptr)))
return (lp->flags & CHFL_CHANPROT);
return 0;
@@ -1314,7 +1282,7 @@ void do_mode(chptr, cptr, sptr, parc, parv, sendts, samode)
if (*mode_buf == '\0' || (*(mode_buf + 1) == '\0' && (*mode_buf == '+'
|| *mode_buf == '-')))
{
if (tschange || isbounce) /* relay bounce time changes */
if (tschange || isbounce) { /* relay bounce time changes */
if (chptr->creationtime)
sendto_serv_butone_token(cptr, me.name,
MSG_MODE, TOK_MODE, "%s %s+ %lu",
@@ -1325,6 +1293,7 @@ void do_mode(chptr, cptr, sptr, parc, parv, sendts, samode)
MSG_MODE, TOK_MODE, "%s %s+ ",
chptr->chname, isbounce ? "&" : "");
return; /* nothing to send */
}
}
/* opermode for twimodesystem --sts */
#ifndef NO_OPEROVERRIDE
+1
View File
@@ -33,6 +33,7 @@
#ifdef PCS
#include <time.h>
#endif
#include <string.h>
ID_Copyright("(C) 1993 Darren Reed");
ID_Notes("DF version was 1.9 1/30/94");
+2 -1
View File
@@ -36,6 +36,7 @@ static char sccxid[] = "@(#)cloak.c 9.00 7/12/99 UnrealIRCd";
#include "userload.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include "h.h"
@@ -210,7 +211,7 @@ char *make_virthost(char *curr, char *new, int mode)
char *x;
int i;
if (curr == NULL)
return;
return (char *)NULL;
mask = hidehost(curr, 0);
if (mode == 0)
+2
View File
@@ -400,6 +400,7 @@ int load_conf2(FILE * conf, char *filename, int type)
{
sendto_realops("Loaded %s ..", filename);
}
return 0;
}
/* Load .network options */
@@ -512,6 +513,7 @@ int load_conf3(FILE * conf, char *filename, int type)
{
sendto_realops("Loaded %s ..", INCLUDE);
}
return 0;
}
+1
View File
@@ -17,6 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <string.h>
#include <limits.h>
#include "numeric.h"
#include "struct.h"
+1
View File
@@ -20,6 +20,7 @@
#endif
#include "nameser.h"
#include "resolv.h"
#include <string.h>
#ifndef lint
static char sccsid[] = "@(#)res.c 2.38 4/13/94 (C) 1992 Darren Reed";
+1
View File
@@ -43,6 +43,7 @@ static char sccsid[] = "@(#)s_auth.c 1.18 4/18/94 (C) 1992 Darren Reed";
#include "sock.h" /* If FD_ZERO isn't define up to this point, */
/* define it (BSD4.2 needs this) */
#include "h.h"
#include <string.h>
/*
* start_auth
+2
View File
@@ -69,6 +69,8 @@ Computing Center and Jarkko Oikarinen";
#endif
#include "resolv.h"
#include "sock.h" /* If FD_ZERO isn't define up to this point, */
#include <string.h>
#include "proto.h"
/* define it (BSD4.2 needs this) */
#include "h.h"
#ifndef NO_FDLIST
+1
View File
@@ -53,6 +53,7 @@ Computing Center and Jarkko Oikarinen";
#if defined(PCS) || defined(AIX) || defined(SVR3)
#include <time.h>
#endif
#include <string.h>
ID_Notes("O:line flags in here");
#include "h.h"
+1 -1
View File
@@ -485,7 +485,7 @@ static char *replies[] = {
/* 442 ERR_NOTONCHANNEL */ ":%s 442 %s %s :You're not on that channel",
/* 443 ERR_USERONCHANNEL */ ":%s 443 %s %s %s :is already on channel",
/* 444 ERR_NOLOGIN */ ":%s 444 %s %s :User not logged in",
/* 445 ERR_SUMMONDISABLED */ ":%s 447 %s :SUMMON has been disabled",
/* 445 ERR_SUMMONDISABLED */ ":%s 445 %s :SUMMON has been disabled",
/* 446 ERR_USERSDISABLED */ ":%s 446 %s :USERS has been disabled",
/* 447 */ NULL,
/* 448 */ NULL,
+1
View File
@@ -53,6 +53,7 @@ Computing Center and Jarkko Oikarinen";
#endif
#include "h.h"
#include "channel.h"
#include <string.h>
#ifndef NO_FDLIST
extern fdlist serv_fdlist;
+1
View File
@@ -30,6 +30,7 @@ Computing Center and Jarkko Oikarinen";
#include "sys.h"
#include "numeric.h"
#include "h.h"
#include <string.h>
extern char backupbuf[];
static char buffer[1024];
+1 -1
View File
@@ -45,7 +45,7 @@ static char sccsid[] =
#endif
#include <time.h>
#include "h.h"
#include <string.h>
static char buf[BUFSIZE];
+1
View File
@@ -6,6 +6,7 @@
#include "sys.h"
#include "numeric.h"
#include "h.h"
#include <string.h>
static int hash(char *); /*
+1 -1
View File
@@ -37,7 +37,7 @@ static char sccsid[] =
#ifdef _WIN32
#include <io.h>
#endif
#include <string.h>
void vsendto_one(aClient *to, char *pattern, va_list vl);
void sendbufto_one(aClient *to);
+1
View File
@@ -30,6 +30,7 @@ static char sccsid[] = "@(#)support.c 2.21 4/13/94 1990, 1991 Armin Gruner;\
#ifdef _WIN32
#include <io.h>
#else
#include <string.h>
extern int errno; /* ...seems that errno.h doesn't define this everywhere */
+1
View File
@@ -35,6 +35,7 @@
#endif
#include <fcntl.h>
#include "h.h"
#include "proto.h"
ID_Copyright("(C) Carsten Munk 2000");
+2 -1
View File
@@ -24,6 +24,8 @@
#include "numeric.h"
#include "h.h"
#include "hash.h"
#include "proto.h"
#include <string.h>
/* externally defined functions */
unsigned int hash_whowas_name(char *); /* defined in hash.c */
@@ -126,7 +128,6 @@ void count_whowas_memory(int *wwu, u_long *wwum)
int i;
int u = 0;
u_long um = 0;
u_long uam = 0;
/* count the number of used whowas structs in 'u' */
/* count up the memory used of whowas structs in um */