-
Notifications
You must be signed in to change notification settings - Fork 37.8k
build: Enable -Wdocumentation (clang) if available #13914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
configure.ac
Outdated
@@ -303,6 +303,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then | |||
AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]]) | |||
AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]]) | |||
AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]]) | |||
AX_CHECK_COMPILE_FLAG([-Wdocumentation],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"],,[[$CXXFLAG_WERROR]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta-nit: Could add this in a line different from the last line to avoid merge conflicts with pulls that also append to this list of warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Fixed! :-)
Concept ACK. Didn't know this existed. |
dbdb908
to
5705f5e
Compare
utACK 5705f5e5a9 |
Confirmed that the first commit does not change the objdump for me. Could go into 0.17 as bugfix, but I don't care too strong. |
NACK in it's current form. When building on macOS, this generates, and fills the build output with hundreds of warnings from our dependencies (mostly libevent and openssl). Is there a way to ignore these?
|
@fanquake Thanks for testing on native mac. I presume they are not present when cross compiling? Removed from the milestone for now. |
I think developers don't have to run with this warning enabled all the time. Could you just append it to the warnings that travis runs? |
I am working on a way of fixing the dependency warning issue. The steps to that are:
Used -Wzero-as-null-pointer-constant to drive it out. Still needs work: |
@Empact Excellent! |
Waiting on one of the tinyformat changes to be merged, they're tagged 0.18 so it will be a minute. You could rebase on the branch I list above, but it's bound to change a bit before I open a PR so I would hold off. |
Maybe we should have a |
I think fixing the documentation here is great, |
@practicalswift how about updating this to just make the docs changes (as they can be helpful in the mean time) and we can do the other thing down the road (as that will take some time). |
5705f5e
to
87df73b
Compare
0e534d4 Fix incorrect Doxygen comments (practicalswift) Pull request description: Fix broken Doxygen comments. This commit was taken from #13914 which now only covers `-Wdocumentation`. Tree-SHA512: dddbca16bb792b8193e5f417151b5eace9acc942a321f1bc095b906e98889e3bd93509fe112ab6a24ee1f6a3a918db905bda7acefd53774fe3e6ebe669fb51ac
Going to close this for now, given that it's reliant on other work, which might not be possible now that #13845 and #13846 aren't being merged, see #13914 (comment). If we find a way to fix all the warnings, then the flag can just be added at that time. |
I’m going to put forward isystem at some point without the tinyformat changes. We could just disable the checks in the tinyformat file, given it is not subtree-checked. |
0e534d4 Fix incorrect Doxygen comments (practicalswift) Pull request description: Fix broken Doxygen comments. This commit was taken from bitcoin#13914 which now only covers `-Wdocumentation`. Tree-SHA512: dddbca16bb792b8193e5f417151b5eace9acc942a321f1bc095b906e98889e3bd93509fe112ab6a24ee1f6a3a918db905bda7acefd53774fe3e6ebe669fb51ac # Conflicts: # src/policy/fees.h # src/wallet/wallet.h
0e534d4 Fix incorrect Doxygen comments (practicalswift) Pull request description: Fix broken Doxygen comments. This commit was taken from bitcoin#13914 which now only covers `-Wdocumentation`. Tree-SHA512: dddbca16bb792b8193e5f417151b5eace9acc942a321f1bc095b906e98889e3bd93509fe112ab6a24ee1f6a3a918db905bda7acefd53774fe3e6ebe669fb51ac # Conflicts: # src/policy/fees.h # src/wallet/wallet.h
0e534d4 Fix incorrect Doxygen comments (practicalswift) Pull request description: Fix broken Doxygen comments. This commit was taken from bitcoin#13914 which now only covers `-Wdocumentation`. Tree-SHA512: dddbca16bb792b8193e5f417151b5eace9acc942a321f1bc095b906e98889e3bd93509fe112ab6a24ee1f6a3a918db905bda7acefd53774fe3e6ebe669fb51ac # Conflicts: # src/policy/fees.h # src/wallet/wallet.h
0e534d4 Fix incorrect Doxygen comments (practicalswift) Pull request description: Fix broken Doxygen comments. This commit was taken from bitcoin#13914 which now only covers `-Wdocumentation`. Tree-SHA512: dddbca16bb792b8193e5f417151b5eace9acc942a321f1bc095b906e98889e3bd93509fe112ab6a24ee1f6a3a918db905bda7acefd53774fe3e6ebe669fb51ac # Conflicts: # src/policy/fees.h # src/wallet/wallet.h
-Wdocumentation
(clang) if available.-Wdocumentation
emit warnings about incorrect use of documentation comments.Fix broken Doxygen comments.Example warnings: