test: fix MIN macro redefinition #31419

pull 0xB10C wants to merge 1 commits into bitcoin:master from 0xB10C:2024-12-fix-MIN-macro-redefined changing 1 files +4 −3
  1. 0xB10C commented at 2:57 pm on December 4, 2024: contributor

    Renames the MIN macro to _TRACEPOINT_TEST_MIN.

    From #31418:

    0stderr:
    1/virtual/main.c:70:9: warning: 'MIN' macro redefined [-Wmacro-redefined]
    2   70 | #define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
    3      |         ^
    4include/linux/minmax.h:329:9: note: previous definition is here
    5  329 | #define MIN(a,b) __cmp(min,a,b)
    6      |         ^
    71 warning generated.
    

    fixes: #31418

  2. test: fix MIN macro-redefinition
    Renames the `MIN` macro to `_TRACEPOINT_TEST_MIN`.
    
    From #31418:
    
    ```
    stderr:
    /virtual/main.c:70:9: warning: 'MIN' macro redefined [-Wmacro-redefined]
       70 | #define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
          |         ^
    include/linux/minmax.h:329:9: note: previous definition is here
      329 | #define MIN(a,b) __cmp(min,a,b)
          |         ^
    1 warning generated.
    ```
    
    fixes: https://github.com/bitcoin/bitcoin/issues/31418
    00c1dbd26d
  3. DrahtBot commented at 2:57 pm on December 4, 2024: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31419.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko

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

  4. DrahtBot added the label Tests on Dec 4, 2024
  5. fanquake added the label Needs backport (28.x) on Dec 4, 2024
  6. maflcko commented at 3:20 pm on December 4, 2024: member
    review ACK 00c1dbd26ddb816e5541c5724397015a92a3d06b
  7. fanquake approved
  8. fanquake commented at 5:12 pm on December 4, 2024: member
    tack 00c1dbd26ddb816e5541c5724397015a92a3d06b
  9. fanquake merged this on Dec 4, 2024
  10. fanquake closed this on Dec 4, 2024

  11. fanquake referenced this in commit 166fea73eb on Dec 4, 2024
  12. achow101 referenced this in commit 227642d5af on Dec 11, 2024
  13. fanquake commented at 11:15 am on December 17, 2024: member
    Backported in #31469.
  14. fanquake removed the label Needs backport (28.x) on Dec 17, 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-12-21 15:12 UTC

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