[cvslog] Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Tue Oct 30 22:04:00 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2001-10-31 04:03:01 UTC
Commited by: Tothwolf <tothwolf at techmonkeys.org>

Modified files:
     configure.ac lib/egglib/hash_table.c lib/egglib/linked_list.c
     lib/egglib/mempool.c lib/egglib/msprintf.c lib/egglib/mstack.c
     modules/filesys/filesys.c modules/transfer/transfer.c src/bg.c
     src/bg.h src/botnet.c src/chanprog.c src/egg_timer.c src/irccmp.h
     src/logfile.c src/main.c src/match.h src/misc.c src/registry.c
     src/script.c src/tcl.c

Log message:

* 39 less gcc warnings...

---------------------- diff included ----------------------
Index: eggdrop1.7/configure.ac
diff -u eggdrop1.7/configure.ac:1.7 eggdrop1.7/configure.ac:1.8
--- eggdrop1.7/configure.ac:1.7	Sun Oct 28 07:30:31 2001
+++ eggdrop1.7/configure.ac	Tue Oct 30 22:02:50 2001
@@ -160,6 +160,6 @@
 AC_SUBST(ac_aux_dir)
 
 # FIXME: module's Makefiles list will prolly become dynamic
-AC_OUTPUT([Makefile doc/Makefile scripts/Makefile lib/Makefile lib/eggdrop/Makefile src/Makefile lib/compat/Makefile lib/egglib/Makefile lib/adns/Makefile modules/Makefile intl/Makefile po/Makefile.in modules/assoc/Makefile modules/blowfish/Makefile modules/channels/Makefile modules/compress/Makefile modules/console/Makefile modules/ctcp/Makefile modules/filesys/Makefile modules/irc/Makefile modules/notes/Makefile modules/perlscript/Makefile modules/server/Makefile modules/share/Makefile modules/tclscript/Makefile modules/transfer/Makefile modules/uptime/Makefile modules/woobie/Makefile])
+AC_OUTPUT([Makefile doc/Makefile intl/Makefile lib/Makefile lib/adns/Makefile lib/compat/Makefile lib/eggdrop/Makefile lib/egglib/Makefile modules/Makefile modules/assoc/Makefile modules/blowfish/Makefile modules/channels/Makefile modules/compress/Makefile modules/console/Makefile modules/ctcp/Makefile modules/filesys/Makefile modules/irc/Makefile modules/notes/Makefile modules/perlscript/Makefile modules/server/Makefile modules/share/Makefile modules/tclscript/Makefile modules/transfer/Makefile modules/uptime/Makefile modules/woobie/Makefile po/Makefile.in scripts/Makefile src/Makefile])
 
 EGG_MSG_CONFIGURE_END
Index: eggdrop1.7/lib/egglib/hash_table.c
diff -u eggdrop1.7/lib/egglib/hash_table.c:1.1 eggdrop1.7/lib/egglib/hash_table.c:1.2
--- eggdrop1.7/lib/egglib/hash_table.c:1.1	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/lib/egglib/hash_table.c	Tue Oct 30 22:02:50 2001
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include "hash_table.h"
 
Index: eggdrop1.7/lib/egglib/linked_list.c
diff -u eggdrop1.7/lib/egglib/linked_list.c:1.1 eggdrop1.7/lib/egglib/linked_list.c:1.2
--- eggdrop1.7/lib/egglib/linked_list.c:1.1	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/lib/egglib/linked_list.c	Tue Oct 30 22:02:50 2001
@@ -1,4 +1,7 @@
 #include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
 #include "mempool.h"
 #include "linked_list.h"
 
@@ -151,7 +154,7 @@
 
 	node = NEW_NODE;
 	if (cursor->node) {
-		if (node->prev = cursor->node->prev) node->prev->next = node;
+		if ((node->prev = cursor->node->prev)) node->prev->next = node;
 		else cursor->list->head = node;
 		node->next = cursor->node;
 		cursor->node->prev = node;
@@ -181,7 +184,7 @@
 	node = NEW_NODE;
 	if (cursor->node) {
 		node->prev = cursor->node;
-		if (node->next = cursor->node->next) node->next->prev = node;
+		if ((node->next = cursor->node->next)) node->next->prev = node;
 		else cursor->list->tail = node;
 		cursor->node->next = node;
 	}
@@ -230,7 +233,7 @@
 	linked_list_node_t *node;
 
 	node = NEW_NODE;
-	if (node->prev = list->tail) node->prev->next = node;
+	if ((node->prev = list->tail)) node->prev->next = node;
 	node->next = (linked_list_node_t *)0;
 	list->tail = node;
 	if (!list->head) list->head = node;
Index: eggdrop1.7/lib/egglib/mempool.c
diff -u eggdrop1.7/lib/egglib/mempool.c:1.1 eggdrop1.7/lib/egglib/mempool.c:1.2
--- eggdrop1.7/lib/egglib/mempool.c:1.1	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/lib/egglib/mempool.c	Tue Oct 30 22:02:50 2001
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
 #include "mempool.h"
 
 mempool_t *mempool_create(mempool_t *pool, int nchunks, int chunk_size)
Index: eggdrop1.7/lib/egglib/msprintf.c
diff -u eggdrop1.7/lib/egglib/msprintf.c:1.1 eggdrop1.7/lib/egglib/msprintf.c:1.2
--- eggdrop1.7/lib/egglib/msprintf.c:1.1	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/lib/egglib/msprintf.c	Tue Oct 30 22:02:50 2001
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdarg.h>
 
 char *msprintf(char *format, ...)
Index: eggdrop1.7/lib/egglib/mstack.c
diff -u eggdrop1.7/lib/egglib/mstack.c:1.1 eggdrop1.7/lib/egglib/mstack.c:1.2
--- eggdrop1.7/lib/egglib/mstack.c:1.1	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/lib/egglib/mstack.c	Tue Oct 30 22:02:50 2001
@@ -1,6 +1,9 @@
 /* Implement a stack based on malloc. */
 
 #include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
 #include "mstack.h"
 
 mstack_t *mstack_new(int initial_size)
Index: eggdrop1.7/modules/filesys/filesys.c
diff -u eggdrop1.7/modules/filesys/filesys.c:1.1 eggdrop1.7/modules/filesys/filesys.c:1.2
--- eggdrop1.7/modules/filesys/filesys.c:1.1	Sat Oct 27 11:34:50 2001
+++ eggdrop1.7/modules/filesys/filesys.c	Tue Oct 30 22:02:50 2001
@@ -2,7 +2,7 @@
  * filesys.c -- part of filesys.mod
  *   main file of the filesys eggdrop module
  *
- * $Id: filesys.c,v 1.1 2001/10/27 16:34:50 ite Exp $
+ * $Id: filesys.c,v 1.2 2001/10/31 04:02:50 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -844,7 +844,7 @@
 {
   bind_table_t *BT_ctcp;
 
-  if (BT_ctcp = find_bind_table2("ctcp"))
+  if ((BT_ctcp = find_bind_table2("ctcp")))
     add_builtins2(BT_ctcp, myctcp);
 }
 
@@ -895,7 +895,7 @@
   if (BT_dcc) rem_builtins2(BT_dcc, mydcc);
   if (BT_load) rem_builtins2(BT_load, myload);
   rem_help_reference("filesys.help");
-  if (BT_ctcp = find_bind_table2("ctcp"))
+  if ((BT_ctcp = find_bind_table2("ctcp")))
     rem_builtins2(BT_ctcp, myctcp);
   del_bind_table2(BT_file);
   del_entry_type(&USERENTRY_DCCDIR);
Index: eggdrop1.7/modules/transfer/transfer.c
diff -u eggdrop1.7/modules/transfer/transfer.c:1.1 eggdrop1.7/modules/transfer/transfer.c:1.2
--- eggdrop1.7/modules/transfer/transfer.c:1.1	Sat Oct 27 11:34:53 2001
+++ eggdrop1.7/modules/transfer/transfer.c	Tue Oct 30 22:02:51 2001
@@ -1,7 +1,7 @@
 /*
  * transfer.c -- part of transfer.mod
  *
- * $Id: transfer.c,v 1.1 2001/10/27 16:34:53 ite Exp $
+ * $Id: transfer.c,v 1.2 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1792,7 +1792,7 @@
 {
   bind_table_t *BT_ctcp;
 
-  if (BT_ctcp = find_bind_table2("ctcp"))
+  if ((BT_ctcp = find_bind_table2("ctcp")))
     add_builtins2(BT_ctcp, transfer_ctcps);
   return 1;
 }
@@ -1830,7 +1830,7 @@
   del_bind_table2(BT_tout);
   if (BT_load) rem_builtins2(BT_load, transfer_load);
   /* Try to remove our CTCP bindings */
-  if (BT_ctcp = find_bind_table2("ctcp"))
+  if ((BT_ctcp = find_bind_table2("ctcp")))
     rem_builtins2(BT_ctcp, transfer_ctcps);
   rem_tcl_commands(mytcls);
   rem_tcl_ints(myints);
Index: eggdrop1.7/src/bg.c
diff -u eggdrop1.7/src/bg.c:1.4 eggdrop1.7/src/bg.c:1.5
--- eggdrop1.7/src/bg.c:1.4	Fri Aug 10 18:51:20 2001
+++ eggdrop1.7/src/bg.c	Tue Oct 30 22:02:51 2001
@@ -1,9 +1,9 @@
 /*
- * bg.c -- handles:
- *   moving the process to the background, i.e. forking, while keeping threads
- *   happy.
+ * bg.c
+ *   Handles moving the process to the background and forking,
+ *   while keeping threads happy.
  *
- * $Id: bg.c,v 1.4 2001/08/10 23:51:20 ite Exp $
+ * $Id: bg.c,v 1.5 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
Index: eggdrop1.7/src/bg.h
diff -u eggdrop1.7/src/bg.h:1.2 eggdrop1.7/src/bg.h:1.3
--- eggdrop1.7/src/bg.h:1.2	Wed Apr 11 21:39:43 2001
+++ eggdrop1.7/src/bg.h	Tue Oct 30 22:02:51 2001
@@ -1,7 +1,7 @@
 /*
  * bg.h
  *
- * $Id: bg.h,v 1.2 2001/04/12 02:39:43 guppy Exp $
+ * $Id: bg.h,v 1.3 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 2000, 2001 Eggheads Development Team
@@ -29,8 +29,12 @@
 	BG_ABORT
 } bg_quit_t;
 
+
+/*
+ * Prototypes
+ */
 void bg_prepare_split(void);
-void bg_send_quit(bg_quit_t q);
+void bg_send_quit(bg_quit_t);
 void bg_do_split(void);
 
 #endif			/* _EGG_BG_H */
Index: eggdrop1.7/src/botnet.c
diff -u eggdrop1.7/src/botnet.c:1.46 eggdrop1.7/src/botnet.c:1.47
--- eggdrop1.7/src/botnet.c:1.46	Sat Oct 20 22:44:30 2001
+++ eggdrop1.7/src/botnet.c	Tue Oct 30 22:02:51 2001
@@ -7,7 +7,7 @@
  *   linking, unlinking, and relaying to another bot
  *   pinging the bots periodically and checking leaf status
  *
- * $Id: botnet.c,v 1.46 2001/10/21 03:44:30 stdarg Exp $
+ * $Id: botnet.c,v 1.47 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -62,7 +62,7 @@
 static cmd_t botnet_events[] = {
 	{"botnet_sigterm", "", (Function) botnet_sigterm, NULL},
 	{"botnet_sighup", "", (Function) botnet_sighup, NULL},
-	0
+	{0}
 };
 
 static void init_bots();
Index: eggdrop1.7/src/chanprog.c
diff -u eggdrop1.7/src/chanprog.c:1.36 eggdrop1.7/src/chanprog.c:1.37
--- eggdrop1.7/src/chanprog.c:1.36	Fri Oct 26 17:22:22 2001
+++ eggdrop1.7/src/chanprog.c	Tue Oct 30 22:02:51 2001
@@ -4,7 +4,7 @@
  *   telling the current programmed settings
  *   initializing a lot of stuff and loading the tcl scripts
  *
- * $Id: chanprog.c,v 1.36 2001/10/26 22:22:22 stdarg Exp $
+ * $Id: chanprog.c,v 1.37 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -299,7 +299,6 @@
 void tell_settings(int idx)
 {
   char s[1024];
-  int i;
   struct flag_record fr = {FR_GLOBAL, 0, 0, 0, 0, 0};
 
   dprintf(idx, "Botnet Nickname: %s\n", botnetnick);
@@ -350,8 +349,6 @@
 
 void chanprog()
 {
-  int i;
-
   admin[0] = 0;
   helpdir[0] = 0;
   tempdir[0] = 0;
Index: eggdrop1.7/src/egg_timer.c
diff -u eggdrop1.7/src/egg_timer.c:1.4 eggdrop1.7/src/egg_timer.c:1.5
--- eggdrop1.7/src/egg_timer.c:1.4	Wed Oct 24 05:08:03 2001
+++ eggdrop1.7/src/egg_timer.c	Tue Oct 30 22:02:51 2001
@@ -1,5 +1,7 @@
-#include <stdio.h> /* For NULL */
-#include <sys/time.h> /* For gettimeofday() */
+#include <stdio.h> /* NULL */
+#include <string.h> /* memcpy() */
+#include <stdlib.h> /* malloc(), free() */
+#include <sys/time.h> /* gettimeofday() */
 
 typedef int (*Function)();
 #include "egg_timer.h"
Index: eggdrop1.7/src/irccmp.h
diff -u eggdrop1.7/src/irccmp.h:1.2 eggdrop1.7/src/irccmp.h:1.3
--- eggdrop1.7/src/irccmp.h:1.2	Fri Oct 12 02:45:48 2001
+++ eggdrop1.7/src/irccmp.h	Tue Oct 30 22:02:51 2001
@@ -2,7 +2,7 @@
  * irccmp.h
  *   prototypes and macros for irccmp.c
  *
- * $Id: irccmp.h,v 1.2 2001/10/12 07:45:48 tothwolf Exp $
+ * $Id: irccmp.h,v 1.3 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1990 Jarkko Oikarinen
@@ -26,21 +26,21 @@
 #define _EGG_IRCCMP_H
 
 
-extern int (*irccmp) (const char *, const char *);
-extern int (*ircncmp) (const char *, const char *, int);
-extern int (*irctoupper) (int);
-extern int (*irctolower) (int);
-
 /*
- * prototypes
+ * Prototypes
  */
 extern int _irccmp(const char *, const char *);
 extern int _ircncmp(const char *, const char *, int);
 extern int _irctolower(int);
 extern int _irctoupper(int);
+extern int (*irccmp) (const char *, const char *);
+extern int (*ircncmp) (const char *, const char *, int);
+extern int (*irctoupper) (int);
+extern int (*irctolower) (int);
+
 
 /*
- * character macros
+ * Character macros
  */
 extern const unsigned char ToLowerTab[];
 #define ToLower(c) (ToLowerTab[(unsigned char)(c)])
Index: eggdrop1.7/src/logfile.c
diff -u eggdrop1.7/src/logfile.c:1.8 eggdrop1.7/src/logfile.c:1.9
--- eggdrop1.7/src/logfile.c:1.8	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/src/logfile.c	Tue Oct 30 22:02:51 2001
@@ -1,5 +1,8 @@
 #include "main.h"
 #include <modvals.h>
+
+#include "modules.h" /* add_hook() */
+
 #include "lib/egglib/msprintf.h"
 #include "script_api.h"
 #include "script.h"
@@ -59,7 +62,7 @@
 
 static script_str_t log_script_strings[] = {
 	{"", "logfile-suffix", &logfile_suffix},
-	0
+	{0}
 };
 
 static script_int_t log_script_ints[] = {
@@ -68,7 +71,7 @@
 	{"", "switch-logfiles-at", &cycle_at},
 	{"", "keep-all-logs", &keep_all_logs},
 	{"", "quick-logs", &quick_logs},
-	0
+	{0}
 };
 
 void logfile_init()
Index: eggdrop1.7/src/main.c
diff -u eggdrop1.7/src/main.c:1.96 eggdrop1.7/src/main.c:1.97
--- eggdrop1.7/src/main.c:1.96	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/src/main.c	Tue Oct 30 22:02:51 2001
@@ -5,7 +5,7 @@
  *   command line arguments
  *   context and assert debugging
  *
- * $Id: main.c,v 1.96 2001/10/28 13:30:33 ite Exp $
+ * $Id: main.c,v 1.97 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -517,7 +517,6 @@
       call_hook(HOOK_5MINUTELY);
       if (!miltime) {	/* At midnight */
 	char s[25];
-	int j;
 
 	strncpyz(s, ctime(&now), sizeof s);
 	putlog(LOG_ALL, "*", "--- %.11s%s", s, s + 20);
@@ -588,7 +587,7 @@
 extern module_entry *module_list;
 void restart_chons();
 
-int init_userent(), init_misc(), init_net(),
+int init_userent(), init_net(),
  init_modules(), init_tcl(int, char **);
 void timer_init();
 void logfile_init();
@@ -721,7 +720,6 @@
   core_binds_init();
   dcc_init();
   init_userent();
-  init_misc();
   botnet_init();
   init_net();
   init_modules();
Index: eggdrop1.7/src/match.h
diff -u eggdrop1.7/src/match.h:1.1 eggdrop1.7/src/match.h:1.2
--- eggdrop1.7/src/match.h:1.1	Thu Oct 11 13:24:01 2001
+++ eggdrop1.7/src/match.h	Tue Oct 30 22:02:51 2001
@@ -2,14 +2,14 @@
  * match.h
  *   prototypes for match.c
  *
- * $Id: match.h,v 1.1 2001/10/11 18:24:01 tothwolf Exp $
+ * $Id: match.h,v 1.2 2001/10/31 04:02:51 tothwolf Exp $
  */
 #ifndef _EGG_MATCH_H
 #define _EGG_MATCH_H
 
 
 /*
- * prototypes
+ * Prototypes
  */
 extern int wild_match(register unsigned char *, register unsigned char *);
 extern int wild_match_per(register unsigned char *, register unsigned char *);
Index: eggdrop1.7/src/misc.c
diff -u eggdrop1.7/src/misc.c:1.51 eggdrop1.7/src/misc.c:1.52
--- eggdrop1.7/src/misc.c:1.51	Thu Oct 18 20:55:05 2001
+++ eggdrop1.7/src/misc.c	Tue Oct 30 22:02:51 2001
@@ -6,7 +6,7 @@
  *   help system
  *   motd display and %var substitution
  *
- * $Id: misc.c,v 1.51 2001/10/19 01:55:05 tothwolf Exp $
+ * $Id: misc.c,v 1.52 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -64,12 +64,6 @@
   struct help_list_t *first;
   struct help_ref *next;
 } *help_list = NULL;
-
-
-void init_misc()
-{
-  static int last = 0;
-}
 
 
 /*
Index: eggdrop1.7/src/registry.c
diff -u eggdrop1.7/src/registry.c:1.3 eggdrop1.7/src/registry.c:1.4
--- eggdrop1.7/src/registry.c:1.3	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/src/registry.c	Tue Oct 30 22:02:51 2001
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <string.h> /* strlen(), memset(), memmove() */
 #include <stdlib.h>
 
 #include "lib/egglib/hash_table.h"
Index: eggdrop1.7/src/script.c
diff -u eggdrop1.7/src/script.c:1.11 eggdrop1.7/src/script.c:1.12
--- eggdrop1.7/src/script.c:1.11	Sun Oct 28 07:30:33 2001
+++ eggdrop1.7/src/script.c	Tue Oct 30 22:02:51 2001
@@ -1,4 +1,7 @@
 #include <stdio.h>
+#include <string.h> /* strlen() */
+#include <stdlib.h> /* calloc(), malloc() */
+
 typedef int (*Function)();
 #include "registry.h"
 #include "script_api.h"
Index: eggdrop1.7/src/tcl.c
diff -u eggdrop1.7/src/tcl.c:1.53 eggdrop1.7/src/tcl.c:1.54
--- eggdrop1.7/src/tcl.c:1.53	Fri Oct 26 17:22:22 2001
+++ eggdrop1.7/src/tcl.c	Tue Oct 30 22:02:51 2001
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.53 2001/10/26 22:22:22 stdarg Exp $
+ * $Id: tcl.c,v 1.54 2001/10/31 04:02:51 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -116,7 +116,7 @@
  *     Vars, traces, misc
  */
 
-int init_dcc_max(), init_misc();
+int init_dcc_max();
 
 /* Used for read/write to integer couplets */
 typedef struct {
----------------------- End of diff -----------------------



More information about the Changes mailing list