RFR: JDK-8329257: AIX: Switch HOTSPOT_TOOLCHAIN_TYPE from xlc to gcc [v3]
Thomas Stuefe
stuefe at openjdk.org
Tue Apr 9 17:02:09 UTC 2024
On Tue, 2 Apr 2024 10:26:42 GMT, Joachim Kern <jkern at openjdk.org> wrote:
>> src/hotspot/os/aix/os_aix.cpp line 314:
>>
>>> 312: ErrnoPreserver ep;
>>> 313: log_trace(os, map)("disclaim failed: " RANGEFMT " errno=(%s)",
>>> 314: RANGEFMTARGS(p, (long)maxDisclaimSize),
>>
>> Wait, why are these casts needed? maxDisclaimSize is size_t, RANGEFMT uses SIZE_FORMAT. That should work without cast.
>
> Hi Thomas, `maxDisclaimSize` is of type `unsigned int`; therefore I get the following warning:
>
> os/aix/os_aix.cpp:314:42: error: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Werror,-Wformat]
> RANGEFMTARGS(p, maxDisclaimSize),
> ^~~~~~~~~~~~~~~
>
> Should I keep the casts, or change the type of `maxDisclaimSize, numFullDisclaimsNeeded, lastDisclaimSize` to `const unsigned long`?
I would change them to size_t. Thanks for doing this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18536#discussion_r1558012122
More information about the build-dev
mailing list