From 1485124291368c4a2ca8ea09c18e813f1dbabf5c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 1 Feb 2021 14:37:14 +0200 Subject: [PATCH 1/2] Fix -Wmismatched-tags warnings --- src/validation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.h b/src/validation.h index e86b3d3af8..fc7add85b7 100644 --- a/src/validation.h +++ b/src/validation.h @@ -40,7 +40,7 @@ class CBlockIndex; class CBlockTreeDB; class CBlockUndo; class CChainParams; -class CCheckpointData; +struct CCheckpointData; class CInv; class CConnman; class CScriptCheck; From b6aadcd5b4350a6ebcd57e88e7a0853cedf7c2fb Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 1 Feb 2021 23:02:45 +0200 Subject: [PATCH 2/2] build: Add -Werror=mismatched-tags --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 23a33b8c4f..dca4c5edd8 100644 --- a/configure.ac +++ b/configure.ac @@ -427,6 +427,7 @@ if test "x$enable_werror" = "xyes"; then AX_CHECK_COMPILE_FLAG([-Werror=suggest-override],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=suggest-override"],,[[$CXXFLAG_WERROR]], [AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])]) AX_CHECK_COMPILE_FLAG([-Werror=unreachable-code-loop-increment],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=mismatched-tags], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"], [], [$CXXFLAG_WERROR]) fi if test "x$CXXFLAGS_overridden" = "xno"; then