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

[PATCH v3 0/2] js/win-lazyload-buildfix

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Sep 26, 2021, 10:05 UTC
Message-ID
<20210926100512.58924-1-carenas@gmail.com>
In-Reply-To
<20210923065251.21363-1-carenas@gmail.com>

To easy the maintainer reroll of this branch with the fixup[1] squashed and the suggested[2] cleanup in the second patch to minimize change and readiness for next.

Carlo Marcelo Arenas Belón (1):
  lazyload.h: use an even more generic function pointer than FARPROC
Johannes Sixt (1):
  lazyload.h: fix warnings about mismatching function pointer types
 compat/win32/lazyload.h | 14 +++++++++-----
 config.mak.dev          |  1 -
 2 files changed, 9 insertions(+), 6 deletions(-)

[1] https://lore.kernel.org/git/3f963bba-3197-8c52-9828-6d78ef1d25b1@kdbg.org/T/#u [2] https://lore.kernel.org/git/CAPUEspivB=07OponiMrfXFBrC+L7qjSUuZEV9q-Ug5Z_ShnFNA@mail.gmail.com/

Range-diff against v2:
1:  79354f549e ! 1:  c389b7ad9d lazyload.h: fix warnings about mismatching function pointer types
    @@ Commit message
         happy. A cast is fine in these cases because they are generic function
         pointer values that have been looked up in a DLL.
     
    +    Helped-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
         Signed-off-by: Johannes Sixt <j6t@kdbg.org>
    -    Signed-off-by: Junio C Hamano <gitster@pobox.com>
     
      ## compat/win32/lazyload.h ##
     @@ compat/win32/lazyload.h: struct proc_addr {
    @@ compat/win32/lazyload.h: struct proc_addr {
      	{ #dll, #function, NULL, 0 }; \
     -	static rettype (WINAPI *function)(__VA_ARGS__)
     +	typedef rettype (WINAPI *proc_type_##function)(__VA_ARGS__); \
    -+	static proc_type_##function function;
    ++	static proc_type_##function function
      
      /*
       * Loads a function from a DLL (once-only).
2:  912c443bde ! 2:  b1efbe2c89 lazyload.h: use an even more generic function pointer than FARPROC
    @@ Commit message
         enabled, 2021-09-03), as it will be no longer needed.
     
         Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
    -    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    -
    - ## compat/mingw.c ##
    -@@ compat/mingw.c: enum EXTENDED_NAME_FORMAT {
    - 
    - static char *get_extended_user_info(enum EXTENDED_NAME_FORMAT type)
    - {
    --	DECLARE_PROC_ADDR(secur32.dll, BOOL, GetUserNameExW,
    --		enum EXTENDED_NAME_FORMAT, LPCWSTR, PULONG);
    - 	static wchar_t wbuffer[1024];
    - 	DWORD len;
    -+	DECLARE_PROC_ADDR(secur32.dll, BOOL, GetUserNameExW,
    -+		enum EXTENDED_NAME_FORMAT, LPCWSTR, PULONG);
    - 
    - 	if (!INIT_PROC_ADDR(GetUserNameExW))
    - 		return NULL;
     
      ## compat/win32/lazyload.h ##
     @@
    @@ config.mak.dev: DEVELOPER_CFLAGS += -pedantic
      endif
      endif
      DEVELOPER_CFLAGS += -Wdeclaration-after-statement
    -
    - ## t/helper/test-drop-caches.c ##
    -@@ t/helper/test-drop-caches.c: static int cmd_dropcaches(void)
    - {
    - 	HANDLE hProcess = GetCurrentProcess();
    - 	HANDLE hToken;
    --	DECLARE_PROC_ADDR(ntdll.dll, DWORD, NtSetSystemInformation, INT, PVOID, ULONG);
    - 	SYSTEM_MEMORY_LIST_COMMAND command;
    - 	int status;
    -+	DECLARE_PROC_ADDR(ntdll.dll, DWORD, NtSetSystemInformation, INT, PVOID, ULONG);
    - 
    - 	if (!OpenProcessToken(hProcess, TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, &hToken))
    - 		return error("Can't open current process token");
-- 
2.33.0.955.gee03ddbf0e
Previous: Carlo Marcelo Arenas BelónNext: Carlo Marcelo Arenas Belón
Message 9 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.