Warning patches:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 13 May 1998 10:00:46 +0000 (10:00 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 13 May 1998 10:00:46 +0000 (10:00 +0000)
        * Makefile.in (lex.o): Depend on output.h.
        * call.c (add_function_candidate): Remove unused variable `cand'.
        (add_conv_candidate): Likewise.
        (build_builtin_candidate): Likewise.
        * cp-tree.h: Add prototype for `types_overlap_p'.
        * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
        * decl2.c (merge_functions): Remove unused variables `tmp' and
        `tempn'.
        * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
        (code_as_string): Likewise.
        (language_as_string): Likewise.
        (parm_as_string): Likewise.
        (op_as_string): Likewise.
        (assop_as_string): Likewise.
        (cv_as_string): Likewise.
        * lex.c: Include output.h.
        * pt.c (type_unification): Cast first argument of `bzero' to a char*.
        * search.c (dfs_no_overlap_yet): Mark parameter `t' with
        ATTRIBUTE_UNUSED.
        * tinfo.cc (__class_type_info::dcast): Change the type of variable
        `i' from int to size_t.
        * typeck.c (language_lvalue_valid): Mark parameter `exp' with
        ATTRIBUTE_UNUSED.

From-SVN: r19707

12 files changed:
gcc/cp/ChangeLog
gcc/cp/Makefile.in
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/error.c
gcc/cp/lex.c
gcc/cp/pt.c
gcc/cp/search.c
gcc/cp/tinfo.cc
gcc/cp/typeck.c

index a2742a5414e366183e42ac8b9a218181f3cfed83..8cfb061f6645a9f5045cf3f76c6e645d0e591596 100644 (file)
@@ -1,3 +1,39 @@
+Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * Makefile.in (lex.o): Depend on output.h.
+       
+       * call.c (add_function_candidate): Remove unused variable `cand'.
+       (add_conv_candidate): Likewise.
+       (build_builtin_candidate): Likewise.
+       
+       * cp-tree.h: Add prototype for `types_overlap_p'.
+
+       * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
+
+       * decl2.c (merge_functions): Remove unused variables `tmp' and
+       `tempn'.
+
+       * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
+       (code_as_string): Likewise.
+       (language_as_string): Likewise.
+       (parm_as_string): Likewise.
+       (op_as_string): Likewise.
+       (assop_as_string): Likewise.
+       (cv_as_string): Likewise.
+
+       * lex.c: Include output.h.
+
+       * pt.c (type_unification): Cast first argument of `bzero' to a char*.
+
+       * search.c (dfs_no_overlap_yet): Mark parameter `t' with
+       ATTRIBUTE_UNUSED.
+
+       * tinfo.cc (__class_type_info::dcast): Change the type of variable
+       `i' from int to size_t.
+
+       * typeck.c (language_lvalue_valid): Mark parameter `exp' with
+       ATTRIBUTE_UNUSED.
+
 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
        * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
index c917e601cb8a63e508d9b7f3d8abb8def1bcb200..869023d15d80a846bfc5bd94484c36ee94ac7baf 100644 (file)
@@ -234,7 +234,8 @@ spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) \
   $(PARSE_H) $(srcdir)/../flags.h lex.h $(srcdir)/../system.h
 lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \
   $(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h \
-  $(srcdir)/../c-pragma.h $(srcdir)/../system.h $(srcdir)/../toplev.h
+  $(srcdir)/../c-pragma.h $(srcdir)/../system.h $(srcdir)/../toplev.h \
+  $(srcdir)/../output.h
 decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
   lex.h decl.h $(srcdir)/../stack.h $(srcdir)/../output.h  \
   $(srcdir)/../except.h $(srcdir)/../system.h $(srcdir)/../toplev.h
index fa02408ff688f00dadc51bf33f6d08e0eee98e9c..a5c16e9617ff9eebc578059db8421a76a6404c74 100644 (file)
@@ -1095,7 +1095,6 @@ add_function_candidate (candidates, fn, arglist, flags)
   tree parmnode = parmlist;
   tree argnode = arglist;
   int viable = 1;
-  struct z_candidate *cand;
 
   /* The `this' and `in_chrg' arguments to constructors are not considered
      in overload resolution.  */
@@ -1183,7 +1182,6 @@ add_conv_candidate (candidates, fn, obj, arglist)
   tree parmnode = parmlist;
   tree argnode = arglist;
   int viable = 1;
-  struct z_candidate *cand;
   int flags = LOOKUP_NORMAL;
 
   for (i = 0; i < len; ++i)
@@ -1243,7 +1241,6 @@ build_builtin_candidate (candidates, fnname, type1, type2,
 {
   tree t, convs;
   int viable = 1, i;
-  struct z_candidate *cand;
   tree types[2];
 
   types[0] = type1;
index 3461bdb5fbfc6575d0c338bfc69ab194b86b9756..183578bcf69b8d33dc96ee99c5427dd64c510885 100644 (file)
@@ -2570,6 +2570,7 @@ extern tree build_dynamic_cast                    PROTO((tree, tree));
 extern void synthesize_tinfo_fn                        PROTO((tree));
 
 /* in search.c */
+extern int types_overlap_p                     PROTO((tree, tree));
 extern void push_memoized_context              PROTO((tree, int));
 extern void pop_memoized_context               PROTO((int));
 extern tree get_vbase                          PROTO((tree, tree));
index 4650bf4fce25e12e3df57ceb4ff42b71ecaef609..287c8ad430ccc543e1aacd570be22c688b05b976 100644 (file)
@@ -5002,7 +5002,7 @@ lookup_name_current_level (name)
 
 static void
 signal_catch (sig)
-     int sig;
+     int sig ATTRIBUTE_UNUSED;
 {
   signal (SIGSEGV, SIG_DFL);
 #ifdef SIGIOT
index 927efb89563cb253ea64952864f8f4e27a7dce66..200ace428312350449c50d00936ca5bfbd7c22d7 100644 (file)
@@ -3743,7 +3743,6 @@ merge_functions (s1, s2)
      tree s1;
      tree s2;
 {
-  tree tmp, tempn;
   if (TREE_CODE (s2) == OVERLOAD)
     while (s2)
       {
index 61739211bb5885443342274e7cd12a6b7f96ab77..9ec1f28f0e33b6f8d28f92b5420c48cb0b50b4f8 100644 (file)
@@ -1706,7 +1706,7 @@ type_as_string (typ, v)
 char *
 expr_as_string (decl, v)
      tree decl;
-     int v;
+     int v ATTRIBUTE_UNUSED;
 {
   OB_INIT ();
 
@@ -1804,7 +1804,7 @@ cp_line_of (t)
 char *
 code_as_string (c, v)
      enum tree_code c;
-     int v;
+     int v ATTRIBUTE_UNUSED;
 {
   return tree_code_name [c];
 }
@@ -1812,7 +1812,7 @@ code_as_string (c, v)
 char *
 language_as_string (c, v)
      enum languages c;
-     int v;
+     int v ATTRIBUTE_UNUSED;
 {
   switch (c)
     {
@@ -1832,7 +1832,8 @@ language_as_string (c, v)
 
 char *
 parm_as_string (p, v)
-     int p, v;
+     int p;
+     int v ATTRIBUTE_UNUSED;
 {
   if (p < 0)
     return "`this'";
@@ -1844,7 +1845,7 @@ parm_as_string (p, v)
 char *
 op_as_string (p, v)
      enum tree_code p;
-     int v;
+     int v ATTRIBUTE_UNUSED;
 {
   static char buf[] = "operator                ";
 
@@ -1858,7 +1859,7 @@ op_as_string (p, v)
 char *
 assop_as_string (p, v)
      enum tree_code p;
-     int v;
+     int v ATTRIBUTE_UNUSED;
 {
   static char buf[] = "operator                ";
 
@@ -1897,7 +1898,7 @@ args_as_string (p, v)
 char *
 cv_as_string (p, v)
      tree p;
-     int v;
+     int v ATTRIBUTE_UNUSED;
 {
   OB_INIT ();
 
index 57707aa3fd09b1e15f6a42fa7e0c45ef114909ba..36a03683a5fe43f38edf2b9cb9b9306d236f37b3 100644 (file)
@@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA.  */
 #include "obstack.h"
 #include "c-pragma.h"
 #include "toplev.h"
+#include "output.h"
 
 /* MULTIBYTE_CHARS support only works for native compilers.
    ??? Ideally what we want is to model widechar support after
index 5b860abed4a44fae2469039e1cf9964a59662e78..e9938770d6eb1ff63e1f3b1bafcd019afcae9cce 100644 (file)
@@ -5684,7 +5684,7 @@ type_unification (tparms, targs, parms, args, targs_in,
        return 1;
 
       explicit_mask = alloca (sizeof (int) * TREE_VEC_LENGTH (targs));
-      bzero (explicit_mask, sizeof(int) * TREE_VEC_LENGTH (targs));
+      bzero ((char *) explicit_mask, sizeof(int) * TREE_VEC_LENGTH (targs));
 
       for (i = 0; 
           i < TREE_VEC_LENGTH (arg_vec) 
index 08291a892a3520beca47690fafb1af40d26648bc..c4b1b6729d657ecc28c2c739c584d70c4bab40f7 100644 (file)
@@ -3868,7 +3868,7 @@ dfs_check_overlap (empty_binfo)
 
 static int
 dfs_no_overlap_yet (t)
-     tree t;
+     tree t ATTRIBUTE_UNUSED;
 {
   return found_overlap == 0;
 }
index 3f320817504718c952f63d8688de5c9385c8de2f..4b68fd1b3fb20e2a6b581ce60b6b4bf7a17bcac7 100644 (file)
@@ -77,7 +77,7 @@ dcast (const type_info& desired, int is_public, void *objptr,
     return objptr;
 
   void *match_found = 0;
-  for (int i = 0; i < n_bases; i++)
+  for (size_t i = 0; i < n_bases; i++)
     {
       if (is_public && base_list[i].access != PUBLIC)
        continue;
index fe66a3b815ecb26022b06da2edca5e0b7f2963aa..27a9c6e010d34975d4a21e99f4d10f79bd9934ed 100644 (file)
@@ -6220,7 +6220,7 @@ build_x_modify_expr (lhs, modifycode, rhs)
 
 int
 language_lvalue_valid (exp)
-     tree exp;
+     tree exp ATTRIBUTE_UNUSED;
 {
   return 1;
 }