Message ID | 20210501130640.9330-2-a@unstable.cc |
---|---|
State | Accepted |
Headers | show |
Series | windows: kill a couple of warnings | expand |
Am 01.05.21 um 15:06 schrieb Antonio Quartulli: > From: Antonio Quartulli <antonio@openvpn.net> > > To print a 64bit poiner, fprintf() must be provided with the appropriate > format specifier. > > The most portable in this case is PRIx64, which is redefined accordingly > on each platform. It comes from inttypes.h and it's the recommended way > to print a 64bit long hex value. Yes. I checked at there seem to be no portable integer same size as pointer, so the ifdef with a 64 bit int is okay here. Acked-By: Arne Schwabe <arne@rfc2549.org>
Your patch has been applied to the master branch. commit 396c4e4903fda078536016b7ada97862f713bd94 Author: Antonio Quartulli Date: Sat May 1 15:06:38 2021 +0200 windows: use appropriate and portable format specifier for 64bit pointer Signed-off-by: Antonio Quartulli <a@unstable.cc> Acked-by: Arne Schwabe <arne@rfc2549.org> Message-Id: <20210501130640.9330-2-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22268.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/common.h b/src/openvpn/common.h index 544fa238..6575bcb7 100644 --- a/src/openvpn/common.h +++ b/src/openvpn/common.h @@ -44,7 +44,7 @@ typedef int interval_t; * Printf formats for special types */ #ifdef _WIN64 -#define ptr_format "0x%I64x" +#define ptr_format "0x%016" PRIx64 #else #define ptr_format "0x%08lx" #endif