From 5fa2e405807dec8f88e9a8a25ab381820631a078 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 11 Dec 2025 14:38:42 +0900 Subject: w32: Add a cast for GetProcAddress, add AM_CFLAGS for w32spawn. * src/Makefile.am (gpgme_w32spawn_CFLAGS): Add AM_CFLAGS. * src/gpgme-w32spawn.c (my_spawn): GetProcAddress returns an address for the symbol. The correctness should be checked by human when writing the code (not by the function prototype). -- GnuPG-bug-id: 7968 Signed-off-by: NIIBE Yutaka --- src/Makefile.am | 2 +- src/gpgme-w32spawn.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index edc239b4..4f45dfe9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -120,7 +120,7 @@ if HAVE_W32_SYSTEM # wrapper process. libexec_PROGRAMS = gpgme-w32spawn -gpgme_w32spawn_CFLAGS = -municode +gpgme_w32spawn_CFLAGS = -municode $(AM_CFLAGS) RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE) diff --git a/src/gpgme-w32spawn.c b/src/gpgme-w32spawn.c index 247d6009..61ef9815 100644 --- a/src/gpgme-w32spawn.c +++ b/src/gpgme-w32spawn.c @@ -249,7 +249,7 @@ my_spawn (wchar_t **argv, struct spawn_fd_item_s *fd_list, unsigned int flags) handle = LoadLibraryA ("user32.dll"); if (handle) { - func = GetProcAddress (handle, "AllowSetForegroundWindow"); + func = (void *)GetProcAddress (handle, "AllowSetForegroundWindow"); if (!func) FreeLibrary (handle); } -- cgit