build: remove redundant warning flags #23269

pull fanquake wants to merge 5 commits into bitcoin:master from fanquake:further_flag_cleanup changing 1 files +1 −5
  1. fanquake commented at 5:34 am on October 13, 2021: member

    This remove the addition of flags that are already part of other options, such as -Wall or -Wextra; see each commit message for details. All of the flags being removed here already exist as part of -Wall as of GCC 8, or, for Clang, all exist in -Wmost (included in -Wall), or as part of -Wextra as of Clang 7. Both of which are our minimum required compilers.

    Also cherry-picks one change from #21458.

    To give an example of how GCCs -Wall has changed over the last few releases:

    11.x to trunk (12.x)

    Added:

    0-Wzero-length-bounds
    1-Wmismatched-dealloc
    2-Wmismatched-new-delete (only for C/C++)
    

    10.x to 11.x

    Added:

    0-Warray-parameter=2 (C and Objective-C only)
    1-Wrange-loop-construct (only for C++)
    2-Wsizeof-array-div
    3-Wvla-parameter (C and Objective-C only)
    

    Removed:

    0-Wenum-conversion in C/ObjC;
    

    9.x to 10.x

    Added:

    0-Wenum-conversion in C/ObjC;
    1-Wformat-overflow
    2-Wformat-truncation
    3-Wzero-length-bounds
    

    8.x to 9.x

    Added:

    0-Wpessimizing-move
    

    Removed:

    0-Wstringop-truncation
    

    7.x to 8.x

    Added:

    0-Wcatch-value (C++ and Objective-C++ only)
    1-Wmissing-attributes
    2-Wmultistatement-macros
    3-Wrestrict
    4-Wsizeof-pointer-div
    5-Wstringop-truncation
    

    Clang Warning Options GCC Warning Options

  2. fanquake added the label Build system on Oct 13, 2021
  3. fanquake added the label DrahtBot Guix build requested on Oct 13, 2021
  4. MarcoFalke approved
  5. MarcoFalke commented at 5:58 am on October 13, 2021: member
    ACK, but would be nice to not add random binary files in intermediate commits and then remove them again.
  6. build: remove -Wsign-compare
    This is part of -Wall in GCC and -Wextra in Clang.
    12712fa2c4
  7. build: use loop-analysis over range-loop-analysis
    To turn on all (future) loop analysis options. Note that
    -Wfor-loop-analysis is also part of -Wmost, which is in -Wall.
    0375906e0a
  8. build: remove -Wswitch
    This is enabled by -Wall in GCC and Clang.
    5239af0574
  9. build: remove -Wunused-variable
    This is enabled via -Wall in GCC, and is
    part of -Wunused, which is included in -Wmost, which is included in
    -Wall in Clang.
    672e8c5d07
  10. build: Drop -Wno-unused-local-typedef
    -Wunused-local-typedef(s) is covered by -Wunused in both gcc and clang.
    No new warnings fire when compiling.
    aa69fd6caf
  11. fanquake force-pushed on Oct 13, 2021
  12. fanquake commented at 6:00 am on October 13, 2021: member

    ACK, but would be nice to not add random binary files in intermediate commits and then remove them again.

    Ugh. Minisketch testing and overzealous use of git add .. Fixed up now.

  13. MarcoFalke commented at 6:07 am on October 13, 2021: member
    git add --patch fixes this ;) (or enumerating the files by hand)
  14. fanquake commented at 7:43 am on October 13, 2021: member

    Guix Build:

     0bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     1ef08b72ba5c8b3d2c78a61e0420307b44c03a9f6d0818943569d456e2dc866dd  guix-build-aa69fd6caf1b/output/aarch64-linux-gnu/SHA256SUMS.part
     2157750561eb3ede7035a83b3aa193a6ac82ef89c10815f6d62714654c1991466  guix-build-aa69fd6caf1b/output/aarch64-linux-gnu/bitcoin-aa69fd6caf1b-aarch64-linux-gnu-debug.tar.gz
     37ea854af1d889a55a3858358a80635a8a2968fe7b2859a6d0ccab7d9c93505e6  guix-build-aa69fd6caf1b/output/aarch64-linux-gnu/bitcoin-aa69fd6caf1b-aarch64-linux-gnu.tar.gz
     43e15116fdbdf38ae33bd9ff7ba2ccc730046289e2750faa0282f700e5c34793c  guix-build-aa69fd6caf1b/output/arm-linux-gnueabihf/SHA256SUMS.part
     533e30217d669565de32d77b1ce2ea4294c4699a204ec4ec4674a999fce3fe16e  guix-build-aa69fd6caf1b/output/arm-linux-gnueabihf/bitcoin-aa69fd6caf1b-arm-linux-gnueabihf-debug.tar.gz
     6819da671bf3f887f5bd039b332f9fc7d00f7abc3f81b106862ab884da9f1a5f9  guix-build-aa69fd6caf1b/output/arm-linux-gnueabihf/bitcoin-aa69fd6caf1b-arm-linux-gnueabihf.tar.gz
     7e1a9852821ecfdefde4396b174bbc8ae27ad603bebff7e459a88e78d7b9c568b  guix-build-aa69fd6caf1b/output/dist-archive/bitcoin-aa69fd6caf1b.tar.gz
     86e7b721d749a2d4673ec60202ae8897c0f7fe5dadca5f171944323c92fecb604  guix-build-aa69fd6caf1b/output/powerpc64-linux-gnu/SHA256SUMS.part
     9286f7d7be35197eb171178d41749a01ba748bbc9f31b29db40b0a06f70b12100  guix-build-aa69fd6caf1b/output/powerpc64-linux-gnu/bitcoin-aa69fd6caf1b-powerpc64-linux-gnu-debug.tar.gz
    1062ae643edb24d56c5b436d4d233c7a6e2a4722a71dfefb57c18009ad3d5f65fe  guix-build-aa69fd6caf1b/output/powerpc64-linux-gnu/bitcoin-aa69fd6caf1b-powerpc64-linux-gnu.tar.gz
    11b98c329adc97c300a5aca577ebc2f879c738b49a50579bca57da9b318294132b  guix-build-aa69fd6caf1b/output/powerpc64le-linux-gnu/SHA256SUMS.part
    129dd09c643db51881c3ec663902ac1925026cbef5821c3c2021a95344a0175e80  guix-build-aa69fd6caf1b/output/powerpc64le-linux-gnu/bitcoin-aa69fd6caf1b-powerpc64le-linux-gnu-debug.tar.gz
    131b318eaf652036d86d799740fba602068e58207f8114ad5a21501ef9962781c2  guix-build-aa69fd6caf1b/output/powerpc64le-linux-gnu/bitcoin-aa69fd6caf1b-powerpc64le-linux-gnu.tar.gz
    14d16d3579f01ef020414461cca6934d1e5b65ebc39e235511c959f9a5cdd050a4  guix-build-aa69fd6caf1b/output/riscv64-linux-gnu/SHA256SUMS.part
    1500937f0556a723f49a680c0652483bdaabe09a0c15d40b22aa68c82c1a80128d  guix-build-aa69fd6caf1b/output/riscv64-linux-gnu/bitcoin-aa69fd6caf1b-riscv64-linux-gnu-debug.tar.gz
    16bc7fd09e563e7ad8e6ba345b4c16fccddc3e48a25d51d86131c5a10bae305a2f  guix-build-aa69fd6caf1b/output/riscv64-linux-gnu/bitcoin-aa69fd6caf1b-riscv64-linux-gnu.tar.gz
    1715074a0b4e6dfb14ad58fc378e36b565432072f21da1090b294488b7e53c1ad7  guix-build-aa69fd6caf1b/output/x86_64-apple-darwin19/SHA256SUMS.part
    18e357da800c24102dfe304e7c0f895e4cee211fb82aab75bb806335a661aa9a28  guix-build-aa69fd6caf1b/output/x86_64-apple-darwin19/bitcoin-aa69fd6caf1b-osx-unsigned.dmg
    195210753c29b8902bd2e53c18d4f662fb47803781da91d7b3d8a4116ff4999643  guix-build-aa69fd6caf1b/output/x86_64-apple-darwin19/bitcoin-aa69fd6caf1b-osx-unsigned.tar.gz
    20db43dca1e3f209912e2e8e8da4cc8bb54b66a7bfe156b08005a7fc6a7b814b91  guix-build-aa69fd6caf1b/output/x86_64-apple-darwin19/bitcoin-aa69fd6caf1b-osx64.tar.gz
    2135f022a7349517929b0f139020393861d4ec298fb03a8ec1d8b5bb8463186859  guix-build-aa69fd6caf1b/output/x86_64-linux-gnu/SHA256SUMS.part
    224a23170e848fb239e1dda50e1d6945b57d3027000b6af8aa48aa8cc9778ca755  guix-build-aa69fd6caf1b/output/x86_64-linux-gnu/bitcoin-aa69fd6caf1b-x86_64-linux-gnu-debug.tar.gz
    237f3d0ecedf46ef4dab7a750d7ce77d62ba165550ea9788ffba1d50f493b4a757  guix-build-aa69fd6caf1b/output/x86_64-linux-gnu/bitcoin-aa69fd6caf1b-x86_64-linux-gnu.tar.gz
    24a208af491bf757347301d81fd3af94f81322a5790051f06a6f1602394b86a73f  guix-build-aa69fd6caf1b/output/x86_64-w64-mingw32/SHA256SUMS.part
    25835ed81163c6bc4df7dee17fb9f641efd0a6dac576875e5d8486ddf7240073d9  guix-build-aa69fd6caf1b/output/x86_64-w64-mingw32/bitcoin-aa69fd6caf1b-win-unsigned.tar.gz
    26c25f542b1ca5acb84bd6b036ab44da3f45011ab5b50b0c48019f609743c7c9fb  guix-build-aa69fd6caf1b/output/x86_64-w64-mingw32/bitcoin-aa69fd6caf1b-win64-debug.zip
    276b841d1f8ac23ad7a4effe0130ae0f4b4d53069ab1ad288313a59a2e565e95b4  guix-build-aa69fd6caf1b/output/x86_64-w64-mingw32/bitcoin-aa69fd6caf1b-win64-setup-unsigned.exe
    28405d7308339bc2d9d10e85ef1c4732d4a6c4ba245b67d015109aedd3ce9a9422  guix-build-aa69fd6caf1b/output/x86_64-w64-mingw32/bitcoin-aa69fd6caf1b-win64.zip
    
  15. practicalswift commented at 8:12 am on October 13, 2021: contributor
    Concept ACK
  16. DrahtBot commented at 2:00 pm on October 13, 2021: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #23191 (build: Disable -Wbraced-scalar-init, which is incompatible with -Wc++11-narrowing by MarcoFalke)

    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.

  17. meshcollider commented at 9:52 am on October 14, 2021: contributor
    utACK aa69fd6caf1b08bfc64889c91639046fb1114326
  18. fanquake merged this on Oct 14, 2021
  19. fanquake closed this on Oct 14, 2021

  20. fanquake deleted the branch on Oct 14, 2021
  21. sidhujag referenced this in commit aad5627fc4 on Oct 14, 2021
  22. MarcoFalke removed the label DrahtBot Guix build requested on Oct 15, 2021
  23. DrahtBot locked this on Oct 30, 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-09-29 04:12 UTC

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