diff options
| author | John Newbery <[email protected]> | 2017-04-04 14:59:35 -0400 |
|---|---|---|
| committer | John Newbery <[email protected]> | 2017-04-04 14:59:35 -0400 |
| commit | cd7f39467afd1f2742a80d608852ebb9eb5179a0 (patch) | |
| tree | 44b165da41a1854b5ceb04a6c1f1e80fcf4509fb /src | |
| parent | Merge #10146: Better error handling for submitblock (diff) | |
| download | discoin-cd7f39467afd1f2742a80d608852ebb9eb5179a0.tar.xz discoin-cd7f39467afd1f2742a80d608852ebb9eb5179a0.zip | |
initialize flag variable to 0 (and continue if GetLogCategory() fails)
Diffstat (limited to 'src')
| -rw-r--r-- | src/init.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 59e5a4a20..1a4d83033 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -913,9 +913,10 @@ bool AppInitParameterInteraction() if (!(GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), std::string("0")) != categories.end())) { for (const auto& cat : categories) { - uint32_t flag; + uint32_t flag = 0; if (!GetLogCategory(&flag, &cat)) { InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debug", cat)); + continue; } logCategories |= flag; } @@ -926,9 +927,10 @@ bool AppInitParameterInteraction() if (mapMultiArgs.count("-debugexclude") > 0) { const std::vector<std::string>& excludedCategories = mapMultiArgs.at("-debugexclude"); for (const auto& cat : excludedCategories) { - uint32_t flag; + uint32_t flag = 0; if (!GetLogCategory(&flag, &cat)) { InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)); + continue; } logCategories &= ~flag; } |