diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-02 21:57:24 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-07-02 22:00:27 +0200 |
commit | 959dd8781ed8982df06b52dd3cecc996cf30f76d (patch) | |
tree | 15b295f8c1b89b55c1f22bd09cb86f9105ce02b2 /src/init.cpp | |
parent | 2935b469ae96a3203bb997a6eddc098903b336ce (diff) |
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);
^
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 672ef77e80..61b26d3618 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1496,7 +1496,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) LogPrintf("Shutdown requested. Exiting.\n"); 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; CAutoFile est_filein(fsbridge::fopen(est_path, "rb"), SER_DISK, CLIENT_VERSION); |