Silence -Wcast-function-type warning #755

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:230911-win-cast changing 1 files +1 −1
  1. hebasto commented at 4:42 pm on September 11, 2023: member

    On Fedora 38 @ 8f7b9eb8711fdb32e8bdb59d2a7462a46c7a8086:

    0$ x86_64-w64-mingw32-g++ --version | head -1
    1x86_64-w64-mingw32-g++ (GCC) 12.2.1 20221121 (Fedora MinGW 12.2.1-8.fc38)
    2$ ./configure CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site CXXFLAGS="-Wno-return-type -Wcast-function-type"
    3$ make > /dev/null
    4qt/winshutdownmonitor.cpp: In static member function 'static void WinShutdownMonitor::registerShutdownBlockReason(const QString&, HWND__* const&)':
    5qt/winshutdownmonitor.cpp:46:42: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'PSHUTDOWNBRCREATE' {aka 'int (*)(HWND__*, const wchar_t*)'} [-Wcast-function-type]
    6   46 |     PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)GetProcAddress(GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate");
    7      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

    Required for https://github.com/bitcoin/bitcoin/pull/25972.

    Picked from https://trac.nginx.org/nginx/ticket/1865.

  2. qt: Silence `-Wcast-function-type` warning
    Required for https://github.com/bitcoin/bitcoin/pull/25972.
    Picked from https://trac.nginx.org/nginx/ticket/1865.
    befb42f146
  3. DrahtBot commented at 4:42 pm on September 11, 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 MarcoFalke

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

  4. hebasto renamed this:
    qt: Silence `-Wcast-function-type` warning
    Silence `-Wcast-function-type` warning
    on Sep 11, 2023
  5. maflcko commented at 1:30 pm on September 12, 2023: contributor

    review ACK befb42f1462f886bf5bed562ba1dae00853cecde

    Didn’t test or compile the code.

  6. hebasto merged this on Sep 22, 2023
  7. hebasto closed this on Sep 22, 2023

  8. hebasto deleted the branch on Sep 22, 2023
  9. Frank-GER referenced this in commit 5ca8948475 on Sep 25, 2023
  10. sidhujag referenced this in commit 109e98bd01 on Sep 26, 2023
  11. bitcoin-core locked this on Sep 21, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:20 UTC

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