This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Small nits in new splay-tree.[ch] files
- To: egcs-patches at cygnus dot com
- Subject: Small nits in new splay-tree.[ch] files
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 22 Oct 1998 15:21:27 -0400 (EDT)
- Cc: mark at markmitchell dot com
This fixes a couple of nits when compiling the splay-tree.[ch]
files with a KNR compiler (SunOS4 cc in this case.)
Okay to install?
--Kaveh
Thu Oct 22 15:17:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* splay-tree.h: Wrap function pointer parameter declarations in
PARAMS() macro.
* splay-tree.c (splay_tree_foreach_helper): Make definition static
to match prototype.
diff -rup orig/egcs-CVS19981021/include/splay-tree.h egcs-CVS19981021/include/splay-tree.h
--- orig/egcs-CVS19981021/include/splay-tree.h Wed Oct 21 16:10:17 1998
+++ egcs-CVS19981021/include/splay-tree.h Wed Oct 21 17:02:02 1998
@@ -52,18 +52,18 @@ typedef struct splay_tree_node *splay_tr
/* The type of a function which compares two splay-tree keys. The
function should return values as for qsort. */
-typedef int (*splay_tree_compare_fn)(splay_tree_key, splay_tree_key);
+typedef int (*splay_tree_compare_fn) PARAMS((splay_tree_key, splay_tree_key));
/* The type of a function used to deallocate any resources associated
with the key. */
-typedef void (*splay_tree_delete_key_fn)(splay_tree_key);
+typedef void (*splay_tree_delete_key_fn) PARAMS((splay_tree_key));
/* The type of a function used to deallocate any resources associated
with the value. */
-typedef void (*splay_tree_delete_value_fn)(splay_tree_value);
+typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value));
/* The type of a function used to iterate over the tree. */
-typedef int (*splay_tree_foreach_fn)(splay_tree_node, void*);
+typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
/* The nodes in the splay tree. */
struct splay_tree_node
diff -rup orig/egcs-CVS19981021/libiberty/splay-tree.c egcs-CVS19981021/libiberty/splay-tree.c
--- orig/egcs-CVS19981021/libiberty/splay-tree.c Wed Oct 21 16:10:36 1998
+++ egcs-CVS19981021/libiberty/splay-tree.c Wed Oct 21 17:02:40 1998
@@ -195,7 +195,7 @@ splay_tree_splay (sp, key)
returns a non-zero value, the iteration ceases immediately, and the
value is returned. Otherwise, this function returns 0. */
-int
+static int
splay_tree_foreach_helper (sp, node, fn, data)
splay_tree sp;
splay_tree_node node;