git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH cb/pedantic-build-for-developers] lazyload.h: fix warnings about mismatching function pointer types

From
Carlo Arenas <carenas@gmail.com>
Date
Sep 23, 2021, 21:00 UTC
Message-ID
<CAPUEspivB=07OponiMrfXFBrC+L7qjSUuZEV9q-Ug5Z_ShnFNA@mail.gmail.com>
In-Reply-To
<4381472f-a9db-b8a7-a395-81c3935309ae@kdbg.org>
On Wed, Sep 22, 2021 at 12:56 PM Johannes Sixt <j6t@kdbg.org> wrote:
Show 11 quoted lines
> diff --git a/compat/win32/lazyload.h b/compat/win32/lazyload.h
> index d2056cdadf..dc35cf080b 100644
> --- a/compat/win32/lazyload.h
> +++ b/compat/win32/lazyload.h
> @@ -26,7 +26,8 @@ struct proc_addr {
>  #define DECLARE_PROC_ADDR(dll, rettype, function, ...) \
>         static struct proc_addr proc_addr_##function = \
>         { #dll, #function, NULL, 0 }; \
> -       static rettype (WINAPI *function)(__VA_ARGS__)
> +       typedef rettype (WINAPI *proc_type_##function)(__VA_ARGS__); \
> +       static proc_type_##function function;

dropping the trailing ";" here will also make this macro easier to use IMHO; feel free to drop all the hunks moving declarations around from my patch when you do if included in a reroll or let me know if I can help otherwise.

Carlo
Previous: Carlo Marcelo Arenas Belón
Message 25 of 25 in “lazyload.h: fix warnings about mismatching function pointer types”
  1. lazyload.h: fix warnings about mismatching function pointer typesJohannes Sixt, Sep 22, 2021
  2. Carlo ArenasSep 22, 2021
  3. Johannes SixtSep 22, 2021
  4. Carlo ArenasSep 23, 2021
  5. lazyload.h: use an even more generic function pointer than FARPROCCarlo Marcelo Arenas Belón, Sep 23, 2021
  6. Johannes SixtSep 23, 2021
  7. Carlo ArenasSep 23, 2021
  8. lazyload.h: use an even more generic function pointer than FARPROCCarlo Marcelo Arenas Belón, Sep 23, 2021
  9. 0/2 js/win-lazyload-buildfixCarlo Marcelo Arenas Belón, Sep 26, 2021
  10. 1/2 lazyload.h: fix warnings about mismatching function pointer typesCarlo Marcelo Arenas Belón, Sep 26, 2021
  11. Eric SunshineSep 27, 2021
  12. 2/2 lazyload.h: use an even more generic function pointer than FARPROCCarlo Marcelo Arenas Belón, Sep 26, 2021
  13. Junio C HamanoSep 27, 2021
  14. Carlo ArenasSep 27, 2021
  15. Junio C HamanoSep 27, 2021
  16. 0/3 js/win-lazyload-buildfixCarlo Marcelo Arenas Belón, Sep 29, 2021
  17. 1/3 lazyload.h: fix warnings about mismatching function pointer typesCarlo Marcelo Arenas Belón, Sep 29, 2021
  18. 2/3 lazyload.h: use an even more generic function pointer than FARPROCCarlo Marcelo Arenas Belón, Sep 29, 2021
  19. 3/3 Makefile: restrict -Wpedantic and -Wno-pedantic-ms-format betterCarlo Marcelo Arenas Belón, Sep 29, 2021
  20. Ramsay JonesSep 29, 2021
  21. 0/3 js/win-lazyload-buildfixCarlo Marcelo Arenas Belón, Sep 29, 2021
  22. 1/3 lazyload.h: fix warnings about mismatching function pointer typesCarlo Marcelo Arenas Belón, Sep 29, 2021
  23. 2/3 lazyload.h: use an even more generic function pointer than FARPROCCarlo Marcelo Arenas Belón, Sep 29, 2021
  24. 3/3 Makefile: restrict -Wpedantic and -Wno-pedantic-ms-format betterCarlo Marcelo Arenas Belón, Sep 29, 2021
  25. Carlo ArenasSep 23, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.