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]
Other format: [Raw text]

[tree-ssa] Fix format in c-call-graph


The appended patch fixes this warning:
/cvs/gcc-tree-ssa-20020619-branch/gcc/c-call-graph.c:124: warning: int format, double arg (arg 6)

Ok to commit? Or should the output really be an int - I'll commit then
the other version.

Andreas



2002-11-29  Andreas Jaeger  <aj@suse.de>

	* c-call-graph.c (construct_call_graph): Fix format.

============================================================
Index: gcc/c-call-graph.c
--- gcc/c-call-graph.c	5 Nov 2002 23:50:37 -0000	1.1.4.7
+++ gcc/c-call-graph.c	29 Nov 2002 08:40:20 -0000
@@ -118,9 +118,9 @@ construct_call_graph (buffer, t, spc)
 
 	  /* Statements based statistics.  */
 	  INDENT (spc+1);
-	  output_printf (buffer, "<stats calls=\"%d\" decisions=\"%d\" stmts=\"%d\" Gilb=\"%d\"", 
+	  output_printf (buffer, "<stats calls=\"%d\" decisions=\"%d\" stmts=\"%d\" Gilb=\"%f\"", 
 			 nb_calls, decision_points, nb_statements, 
-			 ((nb_statements == 0) ? 0 : 
+			 ((nb_statements == 0) ? 0.0 : 
 			  ((float)decision_points / (float)nb_statements)));
 	  
 	  /* Control flow statistics.  */

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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