mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
Merge #10151: [logging] initialize flag variable to 0 (and continue if GetLogCategory() fails)
cd7f394
initialize flag variable to 0 (and continue if GetLogCategory() fails) (John Newbery)
Tree-SHA512: d0f2653bd0e71ed763220cb08d3a5335c5bdfe2f54ff7f9302d97f3265d7aa7f57606fe416a61aaac1535dbb046d0fb40a61f5a9d5cf234b042268e00ee7679d
This commit is contained in:
commit
c7e73eafa1
@ -910,9 +910,10 @@ bool AppInitParameterInteraction()
|
||||
|
||||
if (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;
|
||||
}
|
||||
@ -923,9 +924,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user