From 033ec6d81a160aa5ae22cced29ed97fafe8b33f4 Mon Sep 17 00:00:00 2001 From: Perry Lorier Date: Sat, 15 Jul 2000 12:29:16 +0000 Subject: [PATCH] Author: Isomer Log message: Fixed lots of compiletime warnings. Thanks to CyberDude that gave me a shell so I could test. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@269 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 4 +++- TODO | 2 ++ ircd/fileio.c | 1 + ircd/ircd_reply.c | 1 + ircd/jupe.c | 1 + ircd/m_error.c | 1 + ircd/m_ping.c | 1 + ircd/map.c | 1 + ircd/random.c | 1 + ircd/s_debug.c | 2 +- ircd/s_err.c | 1 + ircd/s_user.c | 6 ++++-- ircd/whowas.c | 1 + 13 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad17e0c..f78ed10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +2000-07-15 Perry Lorier + * various: Fixed warnings after compiling on an alpha. 2000-07-09 Perry Lorier * doc/ircd.8: Applied grammitical changes by Liandrin, applied changes suggested by various other people. @@ -1277,7 +1279,7 @@ # # ChangeLog for ircu2.10.11 # -# $Id: ChangeLog,v 1.156 2000-07-15 01:31:23 isomer Exp $ +# $Id: ChangeLog,v 1.157 2000-07-15 12:29:15 isomer Exp $ # # Insert new changes at beginning of the change list. # diff --git a/TODO b/TODO index 105739c..ba5f4a3 100644 --- a/TODO +++ b/TODO @@ -13,6 +13,8 @@ High Priority: * something is leaking "a meg a minute" with heap debugging on with 1300+ clients (No idea) +* add_Target in s_user.c turns pointers to ints + this doesn't make much sence on alpha where sizeof(void *) != sizeof(int) Medium Priority: * crule parser coredumps on invalid input diff --git a/ircd/fileio.c b/ircd/fileio.c index 410110d..e79936a 100644 --- a/ircd/fileio.c +++ b/ircd/fileio.c @@ -26,6 +26,7 @@ #include /* BUFSIZ, EOF */ #include /* struct stat */ #include /* read, write, open, close */ +#include #define FB_EOF 0x01 #define FB_FAIL 0x02 diff --git a/ircd/ircd_reply.c b/ircd/ircd_reply.c index 57a97de..9020eaa 100644 --- a/ircd/ircd_reply.c +++ b/ircd/ircd_reply.c @@ -32,6 +32,7 @@ #include "send.h" #include +#include int need_more_params(struct Client* cptr, const char* cmd) { diff --git a/ircd/jupe.c b/ircd/jupe.c index 6fdcc64..c49b4fa 100644 --- a/ircd/jupe.c +++ b/ircd/jupe.c @@ -39,6 +39,7 @@ #include "sys.h" /* FALSE bleah */ #include +#include static struct Jupe *GlobalJupeList = 0; diff --git a/ircd/m_error.c b/ircd/m_error.c index 342a4cd..7af17f4 100644 --- a/ircd/m_error.c +++ b/ircd/m_error.c @@ -100,6 +100,7 @@ #include "send.h" #include +#include /* * ms_error - server message handler diff --git a/ircd/m_ping.c b/ircd/m_ping.c index a267b6e..6453ac7 100644 --- a/ircd/m_ping.c +++ b/ircd/m_ping.c @@ -150,6 +150,7 @@ #include "send.h" #include +#include /* * m_ping - generic message handler diff --git a/ircd/map.c b/ircd/map.c index b4cfbf6..07b7c68 100644 --- a/ircd/map.c +++ b/ircd/map.c @@ -31,6 +31,7 @@ #include "struct.h" #include /* sprintf */ +#include void dump_map(struct Client *cptr, struct Client *server, char *mask, int prompt_length) { diff --git a/ircd/random.c b/ircd/random.c index 0e727c3..0fab4de 100644 --- a/ircd/random.c +++ b/ircd/random.c @@ -23,6 +23,7 @@ #include #include +#include char localkey[9] = RANDOM_SEED; diff --git a/ircd/s_debug.c b/ircd/s_debug.c index 904f289..e695ed6 100644 --- a/ircd/s_debug.c +++ b/ircd/s_debug.c @@ -190,7 +190,7 @@ void debug_init(int use_tty) { #ifdef DEBUGMODE if (debuglevel >= 0) { - printf("isatty = %d ttyname = %#x\n", isatty(2), (unsigned int)ttyname(2)); + printf("isatty = %d ttyname = %s\n", isatty(2), ttyname(2)); if (!use_tty) { int fd; /* diff --git a/ircd/s_err.c b/ircd/s_err.c index a57988b..050acd6 100644 --- a/ircd/s_err.c +++ b/ircd/s_err.c @@ -23,6 +23,7 @@ #include "sprintf_irc.h" #include +#include static Numeric replyTable[] = { /* 000 */ diff --git a/ircd/s_user.c b/ircd/s_user.c index cf85fb8..813cf0f 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -900,7 +900,9 @@ static unsigned char hash_target(unsigned int target) */ void add_target(struct Client *sptr, void *target) { - unsigned char hash = hash_target((unsigned int) target); + /* Ok, this shouldn't work esp on alpha + */ + unsigned char hash = hash_target((unsigned long) target); unsigned char* targets; int i; assert(0 != sptr); @@ -933,7 +935,7 @@ void add_target(struct Client *sptr, void *target) int check_target_limit(struct Client *sptr, void *target, const char *name, int created) { - unsigned char hash = hash_target((unsigned int) target); + unsigned char hash = hash_target((unsigned long) target); int i; unsigned char* targets; diff --git a/ircd/whowas.c b/ircd/whowas.c index c2caf4a..9f9c195 100644 --- a/ircd/whowas.c +++ b/ircd/whowas.c @@ -52,6 +52,7 @@ #include #include +#include static struct Whowas whowas[NICKNAMEHISTORYLENGTH]; -- 2.20.1