diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-03-02 09:59:09 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-03-02 09:59:18 -0500 |
commit | 789b0bbf2afcbaa5ce2b99945aa4b02866a61972 (patch) | |
tree | 3d7ea837b88a8fae4dd96ef88106e44d499a513c /src/init.cpp | |
parent | 849f37fa22b039246bd9e154ab83a4031d13a7c1 (diff) | |
parent | 1a7ba84e1194aeeb3c2fc9d79337a84586b834fd (diff) |
Merge #15335: Fix lack of warning of unrecognized section names
1a7ba84e11 Fix lack of warning of unrecognized section names (Akio Nakamura)
Pull request description:
In #14708, It was introduced that to warn when unrecognized section names are exist in the config file.
But ```m_config_sections.clear()``` in ```ArgsManager::ReadConfigStream()``` is called every time when reading each configuration file, so it can warn about only last reading file if ```includeconf``` exists.
This PR fix lack of warning by collecting all section names by moving ```m_config_sections.clear()``` to ```ArgsManager::ReadConfigFiles()``` .
Also add a test code to confirm this situation.
Tree-SHA512: 26aa0cbe3e4ae2e58cbe73d4492ee5cf465fd4c3e5df2c8ca7e282b627df9e637267af1e3816386b1dc6db2398b31936925ce0e432219fec3a9b3398f01e3e65
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 8876b54fde..e0da962030 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -839,7 +839,7 @@ void InitParameterInteraction() // Warn if unrecognized section name are present in the config file. for (const auto& section : gArgs.GetUnrecognizedSections()) { - InitWarning(strprintf(_("Section [%s] is not recognized."), section)); + InitWarning(strprintf("%s:%i " + _("Section [%s] is not recognized."), section.m_file, section.m_line, section.m_name)); } } |