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]

PATCH: silence warning in tree-cfg.c


This one has been irking me for ages.  Conveniently, fmt_str_2 was available for use.
 Okay for mainline, pending a successful bootstrap?


2005-07-12  Ben Elliston  <bje@au.ibm.com>

        * tree-cfg.c (dump_cfg_stats): Add a new fmt_str_2 format string
        and use it when printing num_edges.

Index: tree-cfg.c
===================================================================
RCS file: /home/bje/gcc-cvs/gcc/gcc/tree-cfg.c,v
retrieving revision 2.210
diff -u -p -r2.210 tree-cfg.c
--- tree-cfg.c  10 Jul 2005 00:27:50 -0000      2.210
+++ tree-cfg.c  12 Jul 2005 04:22:09 -0000
@@ -2240,6 +2240,7 @@ dump_cfg_stats (FILE *file)
   basic_block bb;
   const char * const fmt_str   = "%-30s%-13s%12s\n";
   const char * const fmt_str_1 = "%-30s%13d%11lu%c\n";
+  const char * const fmt_str_2 = "%-30s%13ld%11lu%c\n";
   const char * const fmt_str_3 = "%-43s%11lu%c\n";
   const char *funcname
     = lang_hooks.decl_printable_name (current_function_decl, 2);
@@ -2262,7 +2263,7 @@ dump_cfg_stats (FILE *file)
     num_edges += EDGE_COUNT (bb->succs);
   size = num_edges * sizeof (struct edge_def);
   total += size;
-  fprintf (file, fmt_str_1, "Edges", num_edges, SCALE (size), LABEL (size));
+  fprintf (file, fmt_str_2, "Edges", num_edges, SCALE (size), LABEL (size));

   fprintf (file, "---------------------------------------------------------\n");
   fprintf (file, fmt_str_3, "Total memory used by CFG data", SCALE (total),

Attachment: signature.asc
Description: OpenPGP digital signature


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