PATCH: silence warning in tree-cfg.c

Ben Elliston bje@au1.ibm.com
Tue Jul 12 04:23:00 GMT 2005


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),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050712/4277abd3/attachment.sig>


More information about the Gcc-patches mailing list