Skip to content

Instantly share code, notes, and snippets.

@yuyichao
Created June 7, 2022 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuyichao/7e7cc2f240a1a6e92a1b2a9da8eb3905 to your computer and use it in GitHub Desktop.
Save yuyichao/7e7cc2f240a1a6e92a1b2a9da8eb3905 to your computer and use it in GitHub Desktop.
diff --git a/gprofng/src/Print.cc b/gprofng/src/Print.cc
index d6662df4745..e74ea097471 100644
--- a/gprofng/src/Print.cc
+++ b/gprofng/src/Print.cc
@@ -2514,7 +2514,7 @@ er_print_experiment::overview_summary (Ovw_data *ovw_data, int &maxlen)
len = snprintf (buf, sizeof (buf), "%.3lf", tstodouble (totals.total.t));
if (maxlen < len)
maxlen = len;
- snprintf (buf, sizeof (buf), NTXT ("%%#%d.0lf ( %#1.0f %%%%%%%%)"),
+ snprintf (buf, sizeof (buf), NTXT ("%%#%d.0lf ( %#1.0f %%%%)"),
maxlen - 3, 0.);
snprintf (fmt2, sizeof (fmt2), NTXT ("%%%d.3lf"), maxlen);
snprintf (fmt3, sizeof (fmt3), buf, 0.0);
@@ -2605,7 +2605,7 @@ er_print_experiment::overview_value (Value *value, ValueTag value_tag,
case VT_HRTIME:
dvalue = tstodouble (value->t);
if (dvalue == 0.0)
- fprintf (out_file, fmt3, 0., 0.);
+ fputs (fmt3, out_file);
else
fprintf (out_file, fmt4, dvalue, 100.0 * dvalue / total_value);
break;
@@ -2613,7 +2613,7 @@ er_print_experiment::overview_value (Value *value, ValueTag value_tag,
fprintf (out_file, NTXT ("%d"), value->i);
break;
default:
- fprintf (out_file, fmt3);
+ fputs (fmt3, out_file);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment