libgpg-error: [PATCH] w32: Fix handle to pid macro

Biswapriyo Nath nathbappai at gmail.com
Sat Nov 27 20:22:54 CET 2021


-------------- next part --------------
From 62894c52bdd162fa7308c8f70deefc0795021607 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai at gmail.com>
Date: Sun, 28 Nov 2021 00:46:11 +0530
Subject: [PATCH] w32: Fix handle to pid macro

This fixes the warning: cast from pointer to integer of different size

Signed-off-by: Biswapriyo Nath <nathbappai at gmail.com>
---
 src/spawn-w32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spawn-w32.c b/src/spawn-w32.c
index 3ede1f2..3489801 100644
--- a/src/spawn-w32.c
+++ b/src/spawn-w32.c
@@ -78,7 +78,7 @@
  * fit within 32-bit range on 64-bit machine.
  */
 #define pid_to_handle(a) ((HANDLE)(a))
-#define handle_to_pid(a) ((int)(a))
+#define handle_to_pid(a) ((int)(intptr_t)(a))
 
 
 /* Return the maximum number of currently allowed open file
-- 
2.34.1



More information about the Gnupg-devel mailing list