util: add missing include and fix function signature #27192

pull theuni wants to merge 1 commits into bitcoin:master from theuni:fix-readbinaryfile changing 1 files +3 −1
  1. theuni commented at 8:59 pm on March 2, 2023: member

    ping hebasto

    Discovered while testing pre-compiled header support with CMake: https://github.com/theuni/bitcoin/commits/cmake-pch-poc. Compilation of that branch fails without this fix and succeeds with it.

    Similar to the fix in #27144.

    The problem of having a default argument in the definition was masked by the missing include. Using PCH forces that include, so we end up with the compiler error we should’ve been getting all along.

  2. DrahtBot commented at 8:59 pm on March 2, 2023: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake
    Stale ACK TheCharlatan

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Utils/log/libs on Mar 2, 2023
  4. TheCharlatan approved
  5. TheCharlatan commented at 7:24 am on March 3, 2023: contributor
    ACK 101601a1ff7ff8a0eb58171df1227dc7b006cbb9
  6. in src/util/readwritefile.cpp:6 in 101601a1ff outdated
    3@@ -4,14 +4,15 @@
    4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
    5 
    6 #include <fs.h>
    7+#include <util/readwritefile.h>
    


    maflcko commented at 9:11 am on March 3, 2023:

    nit: Including the own module goes on the first line/section, usually, to catch missing includes in the header file.

    Also, could add it to iwyu in ci/test/06_…sh, so that reviewers can look at the ci output if they want?


    theuni commented at 10:24 pm on March 3, 2023:
    Reordered. I think this change is simple enough for manual review :)

    maflcko commented at 9:25 am on March 4, 2023:
    Yeah, I was mostly thinking that it would be good to check for other missing includes while touching the file, so that it doesn’t have to be touched again later if there is a missing stdlib include or so.
  7. maflcko approved
  8. maflcko commented at 9:11 am on March 3, 2023: member
    lgtm
  9. util: add missing include and fix function signature 8847ce44e0
  10. theuni force-pushed on Mar 3, 2023
  11. fanquake approved
  12. fanquake commented at 7:15 am on March 4, 2023: member
    ACK 8847ce44e0713350a6d3524f62eaeb10ba548bae
  13. DrahtBot requested review from TheCharlatan on Mar 4, 2023
  14. fanquake merged this on Mar 4, 2023
  15. fanquake closed this on Mar 4, 2023

  16. sidhujag referenced this in commit cbea9e3fdf on Mar 4, 2023
  17. hebasto commented at 12:14 pm on March 6, 2023: member
    Post-merge ACK.
  18. bitcoin locked this on Mar 5, 2024

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-21 09:12 UTC

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