Mailing List Archive

warnings in libgpg-error
Hello

i'm compiling libgpg-error on Windows with msys2 + mingw-w64. I have
those warnings :


spawn-w32.c: In function '_gpgrt_spawn_process':
spawn-w32.c:81:27: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
81 | #define handle_to_pid(a) ((int)(a))
| ^
spawn-w32.c:634:10: note: in expansion of macro 'handle_to_pid'
634 | *pid = handle_to_pid (pi.hProcess);
| ^~~~~~~~~~~~~
spawn-w32.c: In function '_gpgrt_spawn_process_fd':
spawn-w32.c:81:27: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
81 | #define handle_to_pid(a) ((int)(a))
| ^
spawn-w32.c:717:10: note: in expansion of macro 'handle_to_pid'
717 | *pid = handle_to_pid (pi.hProcess);
| ^~~~~~~~~~~~~


a possible fix would be :

#define handle_to_pid(a) ((int)(uintptr_t)(a))

best regards

Vincent Torri

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel