aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-02-02 08:56:31 +0800
committerfanquake <fanquake@gmail.com>2021-02-02 09:20:19 +0800
commitf72d80b07af8ecbb2f9df1e87344eb465186f19d (patch)
tree6b0c72e408b81023440b2bb6b2bbf97ef987f913
parent2c0fc856a6b0c82c5dddbbaee417171577514507 (diff)
parentb6aadcd5b4350a6ebcd57e88e7a0853cedf7c2fb (diff)
downloadbitcoin-f72d80b07af8ecbb2f9df1e87344eb465186f19d.tar.xz
Merge #21051: Fix -Wmismatched-tags warnings
b6aadcd5b4350a6ebcd57e88e7a0853cedf7c2fb build: Add -Werror=mismatched-tags (Hennadii Stepanov) 1485124291368c4a2ca8ea09c18e813f1dbabf5c Fix -Wmismatched-tags warnings (Hennadii Stepanov) Pull request description: Warnings were introduced in #20749: ``` ./validation.h:43:1: warning: class 'CCheckpointData' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags] class CCheckpointData; ^ ./chainparams.h:24:8: note: previous use is here struct CCheckpointData { ^ ./validation.h:43:1: note: did you mean struct here? class CCheckpointData; ^~~~~ struct 1 warning generated. ``` This change fixes AppVeyor build: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/37547435 ACKs for top commit: glozow: utACK https://github.com/bitcoin/bitcoin/pull/21051/commits/b6aadcd5b4350a6ebcd57e88e7a0853cedf7c2fb 🚗 practicalswift: cr ACK b6aadcd5b4350a6ebcd57e88e7a0853cedf7c2fb: patch looks correct Tree-SHA512: 3ac887ebdbf9a1ae33c1fd5381b3b8d83388ad557ddeb55013acd42bb9752a5bd009e3a0eed52644a023a7a0dda1c159277981af82f58fb0abfe60b84e01bf29
-rw-r--r--configure.ac1
-rw-r--r--src/validation.h2
2 files changed, 2 insertions, 1 deletions
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
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;