RFC: Enabling some commonly enabled compiler diagnostics #17344

issue practicalswift openend this issue on November 1, 2019
  1. practicalswift commented at 3:58 pm on November 1, 2019: contributor

    I’ve compiled a list of commonly enabled compiler diagnostics that we are currently choosing not to enable.

    This is the list:

    Compiler diagnostic no# of emitted unique GCC warnings in master no# of emitted unique Clang warnings in master
    -Wconditional-uninitialized: Warn if a variable may be uninitialized when used Not supported 2
    -Wdouble-promotion: Warn if float is implicit promoted to double 1 8
    -Wduplicated-branches: Warn if if/else branches have duplicated code 0 Not supported
    -Wduplicated-cond: Warn if if/else chain has duplicated conditions 0 Not supported
    -Wfloat-equal: Warn if floating-point values are used in equality comparisons 29 18
    -Wlogical-op: Warn about logical operations being used where bitwise were probably wanted 0 Not supported
    -Wnon-virtual-dtor: Warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors. 22 10
    -Wnull-dereference: Warn if a potential nullptr dereference is detected 48 Not supported
    -Woverloaded-virtual: Warn if you overload (not override) a virtual function 0 0
    -Wsuggest-override: Warn about overriding virtual functions that are not marked with the override keyword 303 (of which 192 are in src/leveldb/ Not supported
    -Wunreachable-code-loop-increment: Warn if a loop will run only once (loop increment never executed) Not supported 1
    -Wunused-member-function: Warn on unused member function Not supported 2
    -Wunused-template: Warn on unused template Not supported 1

    There is a large overlap between this list and Jason Turner’s list of recommended compiler diagnostics in the Collaborative Collection of C++ Best Practices (cppbestpractices) project. There is also an overlap with the recommendations given in the C++ Core Guidelines (with editors Bjarne Stroustrup and Herb Sutter).

    I’m now seeking feedback regarding these diagnostics: which of these would make sense to enable in the Bitcoin Core project? :)

  2. fanquake added the label Brainstorming on Nov 1, 2019
  3. fanquake added the label Build system on Nov 1, 2019
  4. hebasto commented at 7:28 am on November 2, 2019: member
    Do numbers of warnings include warnings in subtrees (e.g., leveldb, secp256k1)?
  5. practicalswift commented at 11:17 am on November 2, 2019: contributor

    @hebasto

    Yes! :)

    More specifically the warnings were recorded using:

     0$ git diff
     1diff --git a/configure.ac b/configure.ac
     2index 9f2942dc9..20ef11346 100644
     3--- a/configure.ac
     4+++ b/configure.ac
     5@@ -334,7 +334,7 @@ fi
     6 if test "x$CXXFLAGS_overridden" = "xno"; then
     7   AX_CHECK_COMPILE_FLAG([-Wall],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"],,[[$CXXFLAG_WERROR]])
     8   AX_CHECK_COMPILE_FLAG([-Wextra],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"],,[[$CXXFLAG_WERROR]])
     9-  AX_CHECK_COMPILE_FLAG([-Wformat],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]])
    10+  AX_CHECK_COMPILE_FLAG([-Wformat=2],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat=2"],,[[$CXXFLAG_WERROR]])
    11   AX_CHECK_COMPILE_FLAG([-Wvla],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
    12   AX_CHECK_COMPILE_FLAG([-Wswitch],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wswitch"],,[[$CXXFLAG_WERROR]])
    13   AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
    14@@ -342,6 +342,19 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
    15   AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]])
    16   AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]])
    17
    18+  AX_CHECK_COMPILE_FLAG([-Wconditional-uninitialized],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wconditional-uninitialized"],,[[$CXXFLAG_WERROR]])
    19+  AX_CHECK_COMPILE_FLAG([-Wdouble-promotion],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdouble-promotion"],,[[$CXXFLAG_WERROR]])
    20+  AX_CHECK_COMPILE_FLAG([-Wduplicated-branches],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-branches"],,[[$CXXFLAG_WERROR]])
    21+  AX_CHECK_COMPILE_FLAG([-Wduplicated-cond],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-cond"],,[[$CXXFLAG_WERROR]])
    22+  AX_CHECK_COMPILE_FLAG([-Wfloat-equal],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wfloat-equal"],,[[$CXXFLAG_WERROR]])
    23+  AX_CHECK_COMPILE_FLAG([-Wlogical-op],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wlogical-op"],,[[$CXXFLAG_WERROR]])
    24+  AX_CHECK_COMPILE_FLAG([-Wnon-virtual-dtor],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wnon-virtual-dtor"],,[[$CXXFLAG_WERROR]])
    25+  AX_CHECK_COMPILE_FLAG([-Wnull-dereference],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wnull-dereference"],,[[$CXXFLAG_WERROR]])
    26+  AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"],,[[$CXXFLAG_WERROR]])
    27+  AX_CHECK_COMPILE_FLAG([-Wunreachable-code-loop-increment],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
    28+  AX_CHECK_COMPILE_FLAG([-Wunused-member-function],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"],,[[$CXXFLAG_WERROR]])
    29+  AX_CHECK_COMPILE_FLAG([-Wunused-template],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-template"],,[[$CXXFLAG_WERROR]])
    30+
    31   ## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
    32   ## unknown options if any other warning is produced. Test the -Wfoo case, and
    33   ## set the -Wno-foo case if it works.
    34$ ./autogen.sh
    35$ CC=gcc CXX=g++ ./configure --with-incompatible-bdb
    36$ make 2>&1 > warnings-gcc.txt
    37$ make clean
    38$ CC=clang CXX=clang++ ./configure --with-incompatible-bdb
    39$ make 2>&1 > warnings-clang.txt
    
  6. laanwj commented at 11:22 am on November 2, 2019: member

    Wformat=2: Warn on security issues around functions that format output (ie printf). We are currently using -Wformat=1 which doesn’t enable -Wformat-security (part of -Wformat=2).

    Seems useless as we disallow all printf family functions because of locale dependency.

  7. laanwj commented at 12:04 pm on November 2, 2019: member
    Also -Wsuggest-override would be kind of nice (#16710).
  8. practicalswift commented at 5:42 pm on November 3, 2019: contributor

    @laanwj

    Seems useless as we disallow all printf family functions because of locale dependency.

    I was hoping that we could apply __attribute__ ((format (printf, 1, 2))) style annotations to LogPrintf and our other functions of that style to get proper compile-time string formatting checking, but after some tinkering I’m afraid that route is not possible.

    OTOH, no harm in bumping from -Wformat=1 to -Wformat=2 to get the stricter checking for the few printf-style standard functions we actually use (vsnprintf, fprintf, etc.).

    Also -Wsuggest-override would be kind of nice (#16710).

    Good point! I’ve added -Wsuggest-override to the list.

    Unfortunately src/leveldb/ produces 192 (!) override warnings - so we’ll have to suppress that :)

  9. hebasto commented at 5:50 pm on November 3, 2019: member

    @practicalswift

    Unfortunately src/leveldb/ produces 192 (!) override warnings - so we’ll have to suppress that :)

    Even on top of #16722 ? ;)

  10. practicalswift commented at 6:41 pm on November 3, 2019: contributor

    @hebasto

    No #16722 would solve that. I hope it gets merged soon :)

  11. laanwj commented at 10:28 am on November 4, 2019: member

    I was hoping that we could apply attribute ((format (printf, 1, 2))) style annotations to LogPrintf and our other functions of that style to get proper compile-time string formatting checking, but after some tinkering I’m afraid that route is not possible.

    It’s indeed not possible. But also this would be undesirable as that checks a few things that are irrelevant in tinyformat due to type-safety:

    • size modifiers don’t matter (llx, …), they would only create noise
    • you can use %s in place of everything
    • std::string can (and should) be passed in as-is
    • dangerous format characters such as %n doesn’t exist

    We also already have test/lint/lint-format-strings.py to do custom checks attuned to our way of formatting. It doesn’t seem to happen often but this is an old, solved problem.

  12. practicalswift commented at 10:58 am on November 4, 2019: contributor

    @laanwj Good points. I’ve now removed -Wformat=2 from the list.

    Can we come up with any good arguments against any of the remaining diagnostics in the list or do they all seem reasonable?

  13. MarcoFalke commented at 5:39 pm on November 5, 2019: member
  14. Sjors commented at 5:59 pm on November 5, 2019: member
    Concept ACK on having one or more Travis instances check for (some / most of) these issues, as well as maybe turning them on by default. We’ll have to try that PR on various developer systems, with and without depends, to see if it doesn’t cause problems. For example I tend to get a flood of spurious warnings on macOS Catalina, which cause me to miss relevant warnings. I’d have to check which warning types occur in the spurious ones.
  15. practicalswift commented at 9:51 pm on November 5, 2019: contributor

    @MarcoFalke @Sjors The scope of this issue is enabling currently disabled diagnostics. -Wunused-variable is already enabled in both Clang and GCC by our use of -Wall.

    With that said: @Sjors - if you want to implement #17377 (comment) I would support such PR :)

  16. laanwj commented at 10:05 pm on November 5, 2019: member
    I’m generally okay with adding additional diagnostics, especially those covered by both gcc and clang, and which don’t diverge too much between compiler versions. I definitely don’t want to repeat the debacle around variable shadowing checks.
  17. Sjors commented at 8:22 am on November 6, 2019: member
    Ah yes, I was talking about -Werror=unused-variable and such. But having warnings locally by default would be good too, except when it becomes a flood of existing issues .
  18. laanwj commented at 9:57 am on November 6, 2019: member
    @practicalswift maybe upload the full list of warnings somewhere for all these diagnostics enabled; then we have a better grasp on how useful, or spammy, these particular reports are
  19. MarcoFalke referenced this in commit b90dad5143 on Nov 15, 2019
  20. sidhujag referenced this in commit 5fe89ff6f0 on Nov 15, 2019
  21. practicalswift commented at 10:34 am on December 12, 2019: contributor

    Some additional diagnostics to consider and their current warning counts. Tested under Clang 10.

     0-Wdeprecated-copy-dtor (5 instances)
     1-Wdisabled-macro-expansion (1 instance)
     2-Wimplicit-fallthrough (9 instances)
     3-Winconsistent-missing-destructor-override (1 instance)
     4-Wshadow (note: might be controversial given memories of historical compiler issues with
     5                this warning type, 5 instances)
     6-Wshadow-uncaptured-local (2 instances)
     7-Wtautological-unsigned-enum-zero-compare (3 instances)
     8-Wthread-safety-attributes (1 instance)
     9-Wunreachable-code-break (10 instances)
    10-Wunreachable-code-return (1 instance)
    
  22. hebasto commented at 10:44 am on December 12, 2019: member

    @practicalswift

    Tested under Clang 10.

    Some Apple Clang 10 warnings are removed in #16641.

  23. practicalswift commented at 4:22 pm on January 8, 2020: contributor

    I’m considering upstreaming a patch I’m using locally. The patch enables a subset of the Clang warnings suggested in this issue.

    The warnings enabled are such that they a.) can help avoid real bugs, b.) can be enabled without false positives and c.) do not introduce a massive number of warnings when compiling against current master.

    These are the enabled diagnostics:

    • -Wdouble-promotion: Warn if float is implicit promoted to double.
    • -Wimplicit-fallthrough: Warn on unannotated fall-through between switch labels.
    • -Woverloaded-virtual: Warn if you overload (not override) a virtual function.
    • -Wshadow-uncaptured-local: Warn if a declaration shadows a variable.
    • -Wunreachable-code-loop-increment: Warn if a loop will run only once (loop increment never executed).
    • -Wunreachable-code-return: Warn if a return statement will never be executed.
    • -Wunused-member-function: Warn on unused member function.
    • -Wunused-template: Warn on unused template.

    Note that I’m not suggesting -Werror for any of these :)

    Any feedback? Should any of the suggested checks be removed before being submitted as a PR?

    I’ll leave this up for discussion and submit a PR next week based on the feedback in this issue :)

    This is the diff if you want to try it out:

     0diff --git a/configure.ac b/configure.ac
     1index 888f67cc8..dc13955f0 100644
     2--- a/configure.ac
     3+++ b/configure.ac
     4@@ -344,6 +344,14 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
     5   AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]])
     6   AX_CHECK_COMPILE_FLAG([-Wunused-variable],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-variable"],,[[$CXXFLAG_WERROR]])
     7   AX_CHECK_COMPILE_FLAG([-Wdate-time],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"],,[[$CXXFLAG_WERROR]])
     8+  AX_CHECK_COMPILE_FLAG([-Wdouble-promotion],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdouble-promotion"],,[[$CXXFLAG_WERROR]])
     9+  AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wimplicit-fallthrough"],,[[$CXXFLAG_WERROR]])
    10+  AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"],,[[$CXXFLAG_WERROR]])
    11+  AX_CHECK_COMPILE_FLAG([-Wshadow-uncaptured-local],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-uncaptured-local"],,[[$CXXFLAG_WERROR]])
    12+  AX_CHECK_COMPILE_FLAG([-Wunreachable-code-loop-increment],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
    13+  AX_CHECK_COMPILE_FLAG([-Wunreachable-code-return],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-return"],,[[$CXXFLAG_WERROR]])
    14+  AX_CHECK_COMPILE_FLAG([-Wunused-member-function],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"],,[[$CXXFLAG_WERROR]])
    15+  AX_CHECK_COMPILE_FLAG([-Wunused-template],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-template"],,[[$CXXFLAG_WERROR]])
    16
    17   dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
    18   dnl unknown options if any other warning is produced. Test the -Wfoo case, and
    
  24. fanquake commented at 5:54 am on January 10, 2020: member

    Any feedback? Should any of the suggested checks be removed before being submitted as a PR?

    -Wimplicit-fallthrough:

    We explicitly disable this (just below), so having it in this diff doesn’t enable anything. I also don’t think we’d turn it on, given that the original reasons it was disabled still apply (large number of warnings in Boost, leveldb and tinyformat etc, see #10489). This is also part of -Wextra for GCC.

    -Wunused-template

    This introduces a large number of Qt related warnings for me:

    0  CXX      qt/libbitcoinqt_a-platformstyle.o
    1In file included from qt/test/wallettests.cpp:1:
    2In file included from ./qt/test/wallettests.h:5:
    3In file included from /usr/local/Cellar/qt/5.14.0/lib/QtTest.framework/Headers/QTest:1:
    4In file included from /usr/local/Cellar/qt/5.14.0/lib/QtTest.framework/Headers/qtest.h:449:
    5In file included from /usr/local/Cellar/qt/5.14.0/lib/QtTest.framework/Headers/qtestsystem.h:45:
    6/usr/local/Cellar/qt/5.14.0/lib/QtCore.framework/Headers/qtestsupport_core.h:55:31: warning: unused function template 'qWaitFor' [-Wunused-template]
    7Q_REQUIRED_RESULT static bool qWaitFor(Functor predicate, int timeout = 5000)
    8                              ^
    91 warning generated.
    

    For everything below, ACK opening a PR, assuming you are fixing any warnings where applicable, and/or have submitted PRs upstream. Note however that this was only doing a quick check on macOS, with brew installed dependencies, so the output could be much worse on other platforms. I also did a quick check on Ubuntu Bionic and saw similar results.

    -Wdouble-promotion

     0torcontrol.cpp:702:51: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
     1    struct timeval time = MillisToTimeval(int64_t(reconnect_timeout * 1000.0));
     2                                                  ^~~~~~~~~~~~~~~~~ ~
     31 warning generated.
     4
     5qt/splashscreen.cpp:54:32: warning: implicit conversion increases floating-point precision: 'float' to 'qreal' (aka 'double') [-Wdouble-promotion]
     6    pixmap.setDevicePixelRatio(devicePixelRatio);
     7           ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~
     8qt/splashscreen.cpp:60:61: warning: implicit conversion increases floating-point precision: 'float' to 'qreal' (aka 'double') [-Wdouble-promotion]
     9    QRadialGradient gradient(QPoint(0,0), splashSize.width()/devicePixelRatio);
    10                    ~~~~~~~~              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    112 warnings generated.
    12
    13qt/trafficgraphwidget.cpp:86:94: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
    14    painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units));
    15                                                                                         ~~~ ^~~
    16qt/trafficgraphwidget.cpp:96:98: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
    17        painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units));
    18                                                                                             ~~~ ^~~
    192 warnings generated.
    

    -Wunreachable-code-loop-increment

    0init.cpp:921:5: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]
    1    for (const auto& arg : gArgs.GetUnsuitableSectionOnlyArgs()) {
    2    ^~~
    31 warning generated.
    

    -Wunused-member-function

     0script/bitcoinconsensus.cpp:50:9: warning: unused member function 'GetType' [-Wunused-member-function]
     1    int GetType() const { return m_type; }
     2        ^
     31 warning generated.
     4
     5index/blockfilterindex.cpp:55:5: warning: unused member function 'DBHeightKey' [-Wunused-member-function]
     6    DBHeightKey() : height(0) {}
     7    ^
     8index/blockfilterindex.cpp:81:5: warning: unused function template 'Unserialize' [-Wunused-template]
     9    ADD_SERIALIZE_METHODS;
    10    ^
    11./serialize.h:198:10: note: expanded from macro 'ADD_SERIALIZE_METHODS'
    12    void Unserialize(Stream& s) {                                     \
    13         ^
    142 warnings generated.
    15
    16test/util_tests.cpp:1919:14: warning: unused member function 'operator=' [-Wunused-member-function]
    17    Tracker& operator=(Tracker&& t) noexcept
    18             ^
    191 warning generated.
    

    -Wunreachable-code-return

    0leveldb/db/log_reader.cc:181:10: warning: 'return' will never be executed [-Wunreachable-code-return]
    1  return false;
    2         ^~~~~
    31 warning generated.
    
  25. practicalswift commented at 2:01 pm on January 10, 2020: contributor

    @fanquake

    Thanks a lot for taking the time to test! That is appreciated!

    -Wimplicit-fallthrough:

    We explicitly disable this (just below), so having it in this diff doesn’t enable anything. I also don’t think we’d turn it on, given that the original reasons it was disabled still apply (large number of warnings in Boost, leveldb and tinyformat etc, see #10489). This is also part of -Wextra for GCC.

    Oh, good catch! Now removed.

    -Wunused-template

    This introduces a large number of Qt related warnings for me:

    Removed.

    Updated diff if someone wants to try it out:

     0diff --git a/configure.ac b/configure.ac
     1index 888f67cc8..e4a7423bd 100644
     2--- a/configure.ac
     3+++ b/configure.ac
     4@@ -344,6 +344,12 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
     5   AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]])
     6   AX_CHECK_COMPILE_FLAG([-Wunused-variable],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-variable"],,[[$CXXFLAG_WERROR]])
     7   AX_CHECK_COMPILE_FLAG([-Wdate-time],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"],,[[$CXXFLAG_WERROR]])
     8+  AX_CHECK_COMPILE_FLAG([-Wdouble-promotion],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdouble-promotion"],,[[$CXXFLAG_WERROR]])
     9+  AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"],,[[$CXXFLAG_WERROR]])
    10+  AX_CHECK_COMPILE_FLAG([-Wshadow-uncaptured-local],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-uncaptured-local"],,[[$CXXFLAG_WERROR]])
    11+  AX_CHECK_COMPILE_FLAG([-Wunreachable-code-loop-increment],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
    12+  AX_CHECK_COMPILE_FLAG([-Wunreachable-code-return],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-return"],,[[$CXXFLAG_WERROR]])
    13+  AX_CHECK_COMPILE_FLAG([-Wunused-member-function],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"],,[[$CXXFLAG_WERROR]])
    14
    15   dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
    16   dnl unknown options if any other warning is produced. Test the -Wfoo case, and
    
  26. fanquake commented at 1:54 am on January 20, 2020: member
    @practicalswift Are you still planning on opening a PR with any of these changes?
  27. hebasto commented at 12:46 pm on February 8, 2020: member

    How about -Wdeprecated for Clang (not supported by GCC)?

    All -Wdeprecated warnings could be removed easily (#16641).

  28. practicalswift commented at 7:15 am on February 10, 2020: contributor
    @fanquake I’d rather see you do it – I think the changes have a greater probability of getting merged if you submit the PR TBH :)
  29. practicalswift commented at 1:14 pm on March 1, 2020: contributor
    Participants in this thread might want to review @hebasto’s excellent #16710 which adds -Wsuggest-override - I think it is ready to merge. Please review :)
  30. fanquake closed this on Aug 18, 2020

  31. sidhujag referenced this in commit 64f37492b7 on Aug 18, 2020
  32. sidhujag referenced this in commit 55f16c9df7 on Nov 10, 2020
  33. Fabcien referenced this in commit 5c2868f3d5 on Sep 15, 2021
  34. Fabcien referenced this in commit 6fc14008fb on Sep 15, 2021
  35. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me