Browse Source

Avoid printing incorrect block indexing time due to uninitialized variable

Fixes:

init.cpp: In function ‘bool AppInitMain(boost::thread_group&, CScheduler&)’:
init.cpp:1499:56: warning: ‘nStart’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart);
                                                        ^
0.15
practicalswift 8 years ago
parent
commit
959dd8781e
  1. 4
      src/init.cpp

4
src/init.cpp

@ -1496,7 +1496,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
LogPrintf("Shutdown requested. Exiting.\n"); LogPrintf("Shutdown requested. Exiting.\n");
return false; return false;
} }
LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart); if (fLoaded) {
LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart);
}
fs::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; fs::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION); CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION);

Loading…
Cancel
Save