mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
Merge #19719: build: Add Werror=range-loop-analysis
fa55c1d5fd
build: Add Werror=range-loop-analysis (MarcoFalke) Pull request description: The warning is implicitly enabled for Bitcoin Core. Also explicitly since commitd92204c900
. To avoid "fix range loop" follow-up refactors, we have two options: * Disable the warning, so that issues never appear * Enable it as an error, so that issues are either caught locally or by ci ACKs for top commit: fanquake: ACKfa55c1d5fd
practicalswift: ACKfa55c1d5fd
-- pre-review fix-up is better than post-review fix-up hebasto: re-ACKfa55c1d5fd
Tree-SHA512: 019aa133f254af8882c1d5d10c420d9882305db0fc2aa9dad7d285168e2556306c3eedcc03bd30e63f11eae4cc82b648d83fb6e9179d6a6364651fb602d70134
This commit is contained in:
commit
53dac67a97
2 changed files with 2 additions and 1 deletions
|
@ -377,6 +377,7 @@ if test "x$enable_werror" = "xyes"; then
|
|||
AX_CHECK_COMPILE_FLAG([-Werror=shadow-field],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=shadow-field"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=thread-safety],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=range-loop-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=range-loop-analysis"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=date-time],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=date-time"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=return-type],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=return-type"],,[[$CXXFLAG_WERROR]])
|
||||
|
|
|
@ -130,7 +130,7 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name)
|
|||
std::vector<bilingual_str> warnings;
|
||||
bool ret = RecoverDatabaseFile(path, error, warnings);
|
||||
if (!ret) {
|
||||
for (const auto warning : warnings) {
|
||||
for (const auto& warning : warnings) {
|
||||
tfm::format(std::cerr, "%s\n", warning.original);
|
||||
}
|
||||
if (!error.empty()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue