Skip to content

Commit f72d80b

Browse files
committed
Merge #21051: Fix -Wmismatched-tags warnings
b6aadcd build: Add -Werror=mismatched-tags (Hennadii Stepanov) 1485124 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 bitcoin/bitcoin@b6aadcd 🚗 practicalswift: cr ACK b6aadcd: patch looks correct Tree-SHA512: 3ac887ebdbf9a1ae33c1fd5381b3b8d83388ad557ddeb55013acd42bb9752a5bd009e3a0eed52644a023a7a0dda1c159277981af82f58fb0abfe60b84e01bf29
2 parents 2c0fc85 + b6aadcd commit f72d80b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ if test "x$enable_werror" = "xyes"; then
427427
AX_CHECK_COMPILE_FLAG([-Werror=suggest-override],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=suggest-override"],,[[$CXXFLAG_WERROR]],
428428
[AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])])
429429
AX_CHECK_COMPILE_FLAG([-Werror=unreachable-code-loop-increment],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
430+
AX_CHECK_COMPILE_FLAG([-Werror=mismatched-tags], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"], [], [$CXXFLAG_WERROR])
430431
fi
431432

432433
if test "x$CXXFLAGS_overridden" = "xno"; then

src/validation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CBlockIndex;
4040
class CBlockTreeDB;
4141
class CBlockUndo;
4242
class CChainParams;
43-
class CCheckpointData;
43+
struct CCheckpointData;
4444
class CInv;
4545
class CConnman;
4646
class CScriptCheck;

0 commit comments

Comments
 (0)