Warning fixes:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Fri, 19 Mar 1999 12:43:55 +0000 (12:43 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 19 Mar 1999 12:43:55 +0000 (12:43 +0000)
        * cccp.c (create_definition): Cast to U_CHAR* when assigning to one.
        * cppfiles.c (read_and_prescan): Likewise.
        Start a #define in column 0.
        * cpplib.c (cpp_define): Cast to U_CHAR* when assigning to one.
        (cpp_push_buffer): Likewise for cpp_buffer*.
        (do_include): Change the type of `fbeg' and `fend' to unsigned char*.
        (do_endif): Cast to char* when assigning to one.
        (do_assert): Likewise.
        (do_unassert): Likewise.
        (cpp_read_check_assertion): Change the type of `name' to U_CHAR*.
        Don't do unnecessary cast to char* anymore.
        * genrecog.c (make_insn_sequence): Cast to char** when assigning
        to one.  Cast the first argument of bzero to PTR.
        * loop.c (strength_reduce): Remove unused variable `note'.
        * reload1.c (new_insn_chain): Cast to struct insn_chain* when
        assigning to one.
        * rtl.c (copy_rtx): Use memcpy instead of bcopy.

From-SVN: r25860

gcc/ChangeLog
gcc/cccp.c
gcc/cppfiles.c
gcc/cpplib.c
gcc/genrecog.c
gcc/loop.c
gcc/reload1.c
gcc/rtl.c

index bf6aa5c..9a17c3c 100644 (file)
@@ -1,3 +1,29 @@
+Fri Mar 19 15:28:38 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * cccp.c (create_definition): Cast to U_CHAR* when assigning to one.
+
+       * cppfiles.c (read_and_prescan): Likewise.
+       Start a #define in column 0.
+
+       * cpplib.c (cpp_define): Cast to U_CHAR* when assigning to one.
+       (cpp_push_buffer): Likewise for cpp_buffer*.
+       (do_include): Change the type of `fbeg' and `fend' to unsigned char*.
+       (do_endif): Cast to char* when assigning to one.
+       (do_assert): Likewise.
+       (do_unassert): Likewise.
+       (cpp_read_check_assertion): Change the type of `name' to U_CHAR*.
+       Don't do unnecessary cast to char* anymore.
+
+       * genrecog.c (make_insn_sequence): Cast to char** when assigning
+       to one.  Cast the first argument of bzero to PTR.
+
+       * loop.c (strength_reduce): Remove unused variable `note'.
+
+       * reload1.c (new_insn_chain): Cast to struct insn_chain* when
+       assigning to one.
+
+       * rtl.c (copy_rtx): Use memcpy instead of bcopy.
+
 Fri Mar 19 11:19:31 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * calls.c (initialize_argument_information): Mark parameters
index 9fa3d1f..a849aab 100644 (file)
@@ -5861,7 +5861,7 @@ create_definition (buf, limit, op)
       if (bp == temp->name && rest_args == 1)
        {
          /* This is the ISO C 9x style.  */
-         temp->name = va_args_name;
+         temp->name = (U_CHAR *) va_args_name;
          temp->length = VA_ARGS_NAME_LENGTH;
        }
       else
index f03b1e2..aac49bd 100644 (file)
@@ -814,7 +814,7 @@ read_and_prescan (pfile, fp, desc, len)
      int desc;
      size_t len;
 {
-  U_CHAR *buf = xmalloc (len);
+  U_CHAR *buf = (U_CHAR *) xmalloc (len);
   U_CHAR *ip, *op, *line_base;
   U_CHAR *ibase;
   unsigned int line, deferred_newlines;
@@ -829,11 +829,11 @@ read_and_prescan (pfile, fp, desc, len)
   /* Table of characters that can't be handled in the inner loop.
      Keep these contiguous to optimize the performance of the code generated
      for the switch that uses them.  */
-  #define SPECCASE_EMPTY     0
-  #define SPECCASE_NUL       1
-  #define SPECCASE_CR        2
-  #define SPECCASE_BACKSLASH 3
-  #define SPECCASE_QUESTION  4
+#define SPECCASE_EMPTY     0
+#define SPECCASE_NUL       1
+#define SPECCASE_CR        2
+#define SPECCASE_BACKSLASH 3
+#define SPECCASE_QUESTION  4
   U_CHAR speccase[256];
 
   offset = 0;
index 8cbe548..d508486 100644 (file)
@@ -188,7 +188,7 @@ cpp_define (pfile, str)
   memcpy (buf, str, count - 2);
   /* Change the first "=" in the string to a space.  If there is none,
      tack " 1" on the end. */
-  p = strchr (buf, '=');
+  p = (U_CHAR *) strchr (buf, '=');
   if (p)
     {
       *p = ' ';
@@ -755,7 +755,7 @@ cpp_push_buffer (pfile, buffer, length)
       return NULL;
     }
 
-  new = xcalloc (sizeof (cpp_buffer), 1);
+  new = (cpp_buffer *) xcalloc (sizeof (cpp_buffer), 1);
 
   new->if_stack = pfile->if_stack;
   new->cleanup = null_cleanup;
@@ -1006,7 +1006,7 @@ do_include (pfile, keyword)
   int angle_brackets = 0;      /* 0 for "...", 1 for <...> */
   int before;  /* included before? */
   long flen;
-  char *fbeg, *fend;
+  unsigned char *fbeg, *fend;
   cpp_buffer *fp;
 
   enum cpp_token token;
@@ -2025,7 +2025,7 @@ do_endif (pfile, keyword)
              for (ip = CPP_BUFFER (pfile); ; ip = CPP_PREV_BUFFER (ip))
                if (ip->fname != NULL)
                  break;
-             ip->ihash->control_macro = temp->control_macro;
+             ip->ihash->control_macro = (char *) temp->control_macro;
            }
         }
       free (temp);
@@ -2748,7 +2748,7 @@ do_assert (pfile, keyword)
     cpp_pedwarn (pfile, "ANSI C does not allow `#assert'");
 
   cpp_skip_hspace (pfile);
-  sym = CPP_PWRITTEN (pfile);  /* remember where it starts */
+  sym = (char *) CPP_PWRITTEN (pfile); /* remember where it starts */
   ret = parse_assertion (pfile);
   if (ret == 0)
     goto error;
@@ -2790,11 +2790,11 @@ do_assert (pfile, keyword)
                      (char *)base->value.aschain, -1);
   base->value.aschain = this;
   
-  pfile->limit = sym; /* Pop */
+  pfile->limit = (unsigned char *) sym; /* Pop */
   return 0;
 
  error:
-  pfile->limit = sym; /* Pop */
+  pfile->limit = (unsigned char *) sym; /* Pop */
   skip_rest_of_line (pfile);
   return 1;
 }
@@ -2815,7 +2815,7 @@ do_unassert (pfile, keyword)
 
   cpp_skip_hspace (pfile);
 
-  sym = CPP_PWRITTEN (pfile);  /* remember where it starts */
+  sym = (char *) CPP_PWRITTEN (pfile); /* remember where it starts */
   ret = parse_assertion (pfile);
   if (ret == 0)
     goto error;
@@ -2860,10 +2860,10 @@ do_unassert (pfile, keyword)
        delete_macro (base);  /* Last answer for this predicate deleted. */
     }
   
-  pfile->limit = sym; /* Pop */
+  pfile->limit = (unsigned char *) sym; /* Pop */
   return 0;
  error:
-  pfile->limit = sym; /* Pop */
+  pfile->limit = (unsigned char *) sym; /* Pop */
   skip_rest_of_line (pfile);
   return 1;
 }
@@ -2885,7 +2885,7 @@ int
 cpp_read_check_assertion (pfile)
      cpp_reader *pfile;
 {
-  char *name = CPP_PWRITTEN (pfile);
+  U_CHAR *name = CPP_PWRITTEN (pfile);
   int result;
   HASHNODE *hp;
   
@@ -2895,7 +2895,7 @@ cpp_read_check_assertion (pfile)
     result = 0;
   else
     {
-      hp = cpp_lookup (pfile, name, (char *)CPP_PWRITTEN (pfile) - name, -1);
+      hp = cpp_lookup (pfile, name, CPP_PWRITTEN (pfile) - name, -1);
       result = (hp != 0);
     }
 
index e66a839..f135947 100644 (file)
@@ -221,8 +221,9 @@ make_insn_sequence (insn, type)
       {
        int new_size;
        new_size = (insn_name_ptr_size ? insn_name_ptr_size * 2 : 512);
-       insn_name_ptr = xrealloc (insn_name_ptr, sizeof(char *) * new_size);
-       bzero (insn_name_ptr + insn_name_ptr_size,
+       insn_name_ptr =
+         (char **) xrealloc (insn_name_ptr, sizeof(char *) * new_size);
+       bzero ((PTR)(insn_name_ptr + insn_name_ptr_size),
               sizeof(char *) * (new_size - insn_name_ptr_size));
        insn_name_ptr_size = new_size;
       }
index 551bcf6..f2adbf4 100644 (file)
@@ -4216,8 +4216,6 @@ strength_reduce (scan_start, end, loop_top, insn_count,
                   p != next->insn;
                   p = next_insn_in_loop (p, scan_start, end, loop_top))
                {
-                 rtx note;
-    
                  if (GET_RTX_CLASS (GET_CODE (p)) != 'i')
                    continue;
                  if (reg_mentioned_p (old_reg, PATTERN (p)))
index 02002fd..081b997 100644 (file)
@@ -509,7 +509,8 @@ new_insn_chain ()
 
   if (unused_insn_chains == 0)
     {
-      c = obstack_alloc (&reload_obstack, sizeof (struct insn_chain));
+      c = (struct insn_chain *)
+       obstack_alloc (&reload_obstack, sizeof (struct insn_chain));
       c->live_before = OBSTACK_ALLOC_REG_SET (&reload_obstack);
       c->live_after = OBSTACK_ALLOC_REG_SET (&reload_obstack);
     }
index 801018e..ae474d0 100644 (file)
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -325,7 +325,7 @@ copy_rtx (orig)
      all fields need copying, and then clear the fields that should
      not be copied.  That is the sensible default behavior, and forces
      us to explicitly document why we are *not* copying a flag.  */
-  bcopy (orig, copy, sizeof (struct rtx_def) - sizeof (rtunion));
+  memcpy (copy, orig, sizeof (struct rtx_def) - sizeof (rtunion));
 
   /* We do not copy the USED flag, which is used as a mark bit during
      walks over the RTL.  */