Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Feb 1, 2021

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

@jnewbery
Copy link
Contributor

jnewbery commented Feb 1, 2021

Code review ACK 1485124

Thanks @hebasto!

@practicalswift
Copy link
Contributor

cr ACK 1485124: patch looks correct

Thanks for fixing warnings!

@hebasto
Copy link
Member Author

hebasto commented Feb 1, 2021

Thanks for fixing warnings!

Not warnings only, but MSVC builds are fixed as well :)

@dongcarl
Copy link
Contributor

dongcarl commented Feb 1, 2021

Code Review ACK 1485124
🤦 @dongcarl

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK. But I unclear on how appveyor failed to catch this before merging. Or maybe changes were merged despite appveyor failing? I do see appveyor errors one of my recent pushes: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/37552923

Would be nice to know what's going on with appveyor. Also ideally we would make either make this an error on linux, or make this not an error on windows to be consistent across platforms.

@ajtowns
Copy link
Contributor

ajtowns commented Feb 1, 2021

ACK 1485124

I think adding:

AX_CHECK_COMPILE_FLAG([-Werror=mismatched-tags],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"],,[[$CXXFLAG_WERROR]])

after the -Werror=unreachable-code-loop-increment line is all you need to make this an error for clang on linux when configuring with enable-werror.

@hebasto
Copy link
Member Author

hebasto commented Feb 1, 2021

Updated.

@glozow
Copy link
Member

glozow commented Feb 1, 2021

utACK b6aadcd 🚗

Thanks @hebasto, u so fast ⚡

@practicalswift
Copy link
Contributor

cr ACK b6aadcd: patch looks correct

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 1, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@jnewbery
Copy link
Contributor

jnewbery commented Feb 2, 2021

But I unclear on how appveyor failed to catch this before merging. Or maybe changes were merged despite appveyor failing?

This is at least partially my fault. I encouraged @laanwj to merge #20749. I'd seen a "QT download hash mismatch" error in appveyor and assumed it was spurious.

@hebasto hebasto deleted the 210201-warning branch February 2, 2021 08:47
@laanwj
Copy link
Member

laanwj commented Feb 2, 2021

Appveyor is flaky enough, and has been flaky enough historically (with really strange issues like sudden compiler upgrades breaking compatibility) that I must admit to sometimes ignore it. Sorry for that in this case.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 3, 2021
b6aadcd build: Add -Werror=mismatched-tags (Hennadii Stepanov)
1485124 Fix -Wmismatched-tags warnings (Hennadii Stepanov)

Pull request description:

  Warnings were introduced in bitcoin#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@b6aadcd 🚗
  practicalswift:
    cr ACK b6aadcd: patch looks correct

Tree-SHA512: 3ac887ebdbf9a1ae33c1fd5381b3b8d83388ad557ddeb55013acd42bb9752a5bd009e3a0eed52644a023a7a0dda1c159277981af82f58fb0abfe60b84e01bf29
@ryanofsky ryanofsky mentioned this pull request Feb 3, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants