aboutsummaryrefslogtreecommitdiffstats
path: root/icetime
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2019-04-30 22:07:23 +0200
committerMichael Buesch <m@bues.ch>2019-04-30 22:08:47 +0200
commit9f48587713ae3e8fbbf6459006c6e3dc3dda040b (patch)
tree6620425036e24ca1939b7b8558e12d98e51d0aff /icetime
parentb1026f8b755b20b18f59e25a87adc717f7ba912f (diff)
downloadicestorm-9f48587713ae3e8fbbf6459006c6e3dc3dda040b.tar.gz
icestorm-9f48587713ae3e8fbbf6459006c6e3dc3dda040b.tar.bz2
icestorm-9f48587713ae3e8fbbf6459006c6e3dc3dda040b.zip
Fix warnings: 'may be used uninitialized in this function'
icetime.cc: In member function ‘double TimingAnalysis::report(std::__cxx11::string)’: icetime.cc:1095:15: warning: ‘last_time’ may be used uninitialized in this function [-Wmaybe-uninitialized] fprintf(frpt, "%10.3f ns ..%7.3f ns %s\n", first_time, last_time, last_net.c_str()); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ icetime.cc:1095:15: warning: ‘first_time’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Diffstat (limited to 'icetime')
-rw-r--r--icetime/icetime.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc
index 2feedfe..cc37625 100644
--- a/icetime/icetime.cc
+++ b/icetime/icetime.cc
@@ -1087,7 +1087,7 @@ struct TimingAnalysis
fprintf(frpt, "Resolvable net names on path:\n");
std::string last_net;
- double first_time, last_time;
+ double first_time = 0.0, last_time = 0.0;
for (int i = int(sym_list.size())-1; i >= 0; i--) {
if (last_net != sym_list[i].second) {