This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs CVS 19980621, warning patch part 2/7


	This is warning patch part 2/7.  Okay to install?



Sun Jun 21 16:39:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (varasm.o): Depend on sdbout.h.
	(sdbout.o): Depend on toplev.h.

	* collect2.c (scan_prog_file): Cast fprintf argument to `long' and
	use %ld specifier.

	* final.c (shorten_branches): Cast first arg of `bzero' to char *.

	* genextract.c (main): When creating insn-extract.c, mark variable
	`i' with ATTRIBUTE_UNUSED.

	* genpeep.c (main): When creating insn-peep.c, mark variables
	`insn', `x' and `pat' with ATTRIBUTE_UNUSED.

	* objc/init.c (__objc_tree_print): Wrap function definition in
	macro `DEBUG'.

	* objc/objc-act.c (encode_array): Cast sprintf argument to `long'
	and use %ld specifier.
	(adorn_decl): Likewise, twice.

diff -rup orig/egcs-CVS19980621/gcc/Makefile.in egcs-CVS19980621/gcc/Makefile.in
--- orig/egcs-CVS19980621/gcc/Makefile.in	Sun Jun 21 08:43:44 1998
+++ egcs-CVS19980621/gcc/Makefile.in	Sun Jun 21 15:26:12 1998
@@ -1372,7 +1372,7 @@ rtlanal.o : rtlanal.c $(CONFIG_H) system
 
 varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
    function.h defaults.h insn-codes.h expr.h hard-reg-set.h regs.h \
-   xcoffout.h output.h c-pragma.h toplev.h except.h dbxout.h
+   xcoffout.h output.h c-pragma.h toplev.h except.h dbxout.h sdbout.h
 function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \
    insn-config.h $(RECOG_H) output.h toplev.h except.h
@@ -1398,7 +1398,7 @@ dbxout.o : dbxout.c $(CONFIG_H) system.h
    toplev.h
 sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
    function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
-   insn-config.h obstack.h xcoffout.h c-pragma.h sdbout.h
+   insn-config.h obstack.h xcoffout.h c-pragma.h sdbout.h toplev.h
 dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
    flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
 dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
diff -rup orig/egcs-CVS19980621/gcc/collect2.c egcs-CVS19980621/gcc/collect2.c
--- orig/egcs-CVS19980621/gcc/collect2.c	Sun Jun 21 08:43:54 1998
+++ egcs-CVS19980621/gcc/collect2.c	Sun Jun 21 14:16:56 1998
@@ -2828,8 +2828,8 @@ scan_prog_file (prog_name, which_pass)
 #else
 		      if (debug)
 			fprintf (stderr,
-				 "\tiss = %5d, value = %5d, index = %5d, name = %s\n",
-				 symbol.iss, symbol.value, symbol.index, name);
+				 "\tiss = %5d, value = %5ld, index = %5d, name = %s\n",
+				 symbol.iss, (long) symbol.value, symbol.index, name);
 #endif
 		    }
 #ifdef COLLECT_EXPORT_LIST
diff -rup orig/egcs-CVS19980621/gcc/final.c egcs-CVS19980621/gcc/final.c
--- orig/egcs-CVS19980621/gcc/final.c	Sun Jun 21 08:44:08 1998
+++ egcs-CVS19980621/gcc/final.c	Sun Jun 21 12:42:39 1998
@@ -1028,7 +1028,7 @@ shorten_branches (first)
   min_labelno = get_first_label_num ();
   label_align = (struct label_alignment *) xmalloc (
     (max_labelno - min_labelno + 1) * sizeof (struct label_alignment));
-  bzero (label_align,
+  bzero ((char *) label_align,
     (max_labelno - min_labelno + 1) * sizeof (struct label_alignment));
 
   uid_shuid = (int *) xmalloc (max_uid * sizeof *uid_shuid);
diff -rup orig/egcs-CVS19980621/gcc/genextract.c egcs-CVS19980621/gcc/genextract.c
--- orig/egcs-CVS19980621/gcc/genextract.c	Sun Jun 21 08:44:50 1998
+++ egcs-CVS19980621/gcc/genextract.c	Sun Jun 21 13:07:16 1998
@@ -480,7 +480,7 @@ from the machine description file `md'. 
   printf ("  register rtx *ro = recog_operand;\n");
   printf ("  register rtx **ro_loc = recog_operand_loc;\n");
   printf ("  rtx pat = PATTERN (insn);\n");
-  printf ("  int i;\n\n");
+  printf ("  int i ATTRIBUTE_UNUSED;\n\n");
   printf ("  switch (INSN_CODE (insn))\n");
   printf ("    {\n");
   printf ("    case -1:\n");
diff -rup orig/egcs-CVS19980621/gcc/genpeep.c egcs-CVS19980621/gcc/genpeep.c
--- orig/egcs-CVS19980621/gcc/genpeep.c	Sun Jun 21 08:44:51 1998
+++ egcs-CVS19980621/gcc/genpeep.c	Sun Jun 21 13:04:45 1998
@@ -481,7 +481,7 @@ from the machine description file `md'. 
   printf ("#define operands peep_operand\n\n");
 
   printf ("rtx\npeephole (ins1)\n     rtx ins1;\n{\n");
-  printf ("  rtx insn, x, pat;\n\n");
+  printf ("  rtx insn ATTRIBUTE_UNUSED, x ATTRIBUTE_UNUSED, pat ATTRIBUTE_UNUSED;\n\n");
 
   /* Early out: no peepholes for insns followed by barriers.  */
   printf ("  if (NEXT_INSN (ins1)\n");
diff -rup orig/egcs-CVS19980621/gcc/objc/init.c egcs-CVS19980621/gcc/objc/init.c
--- orig/egcs-CVS19980621/gcc/objc/init.c	Sun Jun 21 08:45:23 1998
+++ egcs-CVS19980621/gcc/objc/init.c	Sun Jun 21 12:48:41 1998
@@ -280,6 +280,7 @@ objc_postorder_traverse (objc_class_tree
 }
 
 /* Used to print a tree class hierarchy. */
+#ifdef DEBUG
 static void
 __objc_tree_print (objc_class_tree *tree, int level)
 {
@@ -289,6 +290,7 @@ __objc_tree_print (objc_class_tree *tree
     printf ("  ");
   printf ("%s\n", tree->class->name);
 }
+#endif
 
 /* Walks on a linked list of methods in the reverse order and executes all
    the methods corresponding to `op' selector. Walking in the reverse order
diff -rup orig/egcs-CVS19980621/gcc/objc/objc-act.c egcs-CVS19980621/gcc/objc/objc-act.c
--- orig/egcs-CVS19980621/gcc/objc/objc-act.c	Sun Jun 21 08:45:24 1998
+++ egcs-CVS19980621/gcc/objc/objc-act.c	Sun Jun 21 14:12:05 1998
@@ -6557,9 +6557,9 @@ encode_array (type, curtype, format)
       return;
     }
 
-  sprintf (buffer, "[%d",
-	   (TREE_INT_CST_LOW (an_int_cst)
-	    / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
+  sprintf (buffer, "[%ld",
+	   (long) (TREE_INT_CST_LOW (an_int_cst)
+		   / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
 
   obstack_grow (&util_obstack, buffer, strlen (buffer));
   encode_type (array_of, curtype, format);
@@ -7361,7 +7361,8 @@ adorn_decl (decl, str)
       tree an_int_cst = TREE_OPERAND (decl, 1);
 
       if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_CST)
-	sprintf (str + strlen (str), "[%d]", TREE_INT_CST_LOW (an_int_cst));
+	sprintf (str + strlen (str), "[%ld]",
+		 (long) TREE_INT_CST_LOW (an_int_cst));
       else
 	strcat (str, "[]");
     }
@@ -7372,9 +7373,9 @@ adorn_decl (decl, str)
       tree array_of = TREE_TYPE (decl);
 
       if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_TYPE)
-	sprintf (str + strlen (str), "[%d]",
-		 (TREE_INT_CST_LOW (an_int_cst)
-		  / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
+	sprintf (str + strlen (str), "[%ld]",
+		 (long) (TREE_INT_CST_LOW (an_int_cst)
+			 / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
       else
 	strcat (str, "[]");
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]