Modify warning messages that appear in the TRACE* function
;lmlmklxn
576420940 at qq.com
Tue Jul 2 01:45:39 UTC 2024
When compiling jdk8u from x86_64, there is an alarm message as shown below.
jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:719:3: note: in expansion of macro ‘TRACE1’
719 | TRACE1("[GSSLibStub_getCredName] pName=%" PRIuPTR "", (uintptr_t) nameHdl);
| ^~~~~~
jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function ‘Java_sun_security_jgss_wrapper_GSSLibStub_importContext’:
jdk/src/share/native/sun/security/jgss/wrapper/NativeUtil.h:92:52: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
PRIuPTR is defined in jdk/src/share/native/sun/security/jgss/wrapper/NativeUtil.h
Upon checking the code, it was found that the custom macro PRIuPTR was used in the Linux system. The header file # include<inttypes.h> should be used in linux.
There are two solutions, one is limit the usage range of custom macros to visual studio 2010-2012.and the other is remove special macro definitions related to _MSC_VER.
;lmlmklxn
576420940 at qq.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk8u-dev/attachments/20240702/9805c7da/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8B60029A at C4AFE039.C35B8366.png
Type: application/octet-stream
Size: 9017 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/jdk8u-dev/attachments/20240702/9805c7da/8B60029AC4AFE039.C35B8366-0001.png>
More information about the jdk8u-dev
mailing list