RFR: 8299635: Hotspot update for deprecated sprintf in Xcode 14 [v5]

Chris Plummer cjplummer at openjdk.org
Tue Jan 17 20:53:23 UTC 2023


On Tue, 17 Jan 2023 01:28:08 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Merge
>>  - correction for ppc
>>  - missed update for debug mode
>>  - more in src/hotspot
>>  - typo correction
>>  - 8299635: More test issues for deprecated sprintf in Xcode 14
>
> src/hotspot/os/windows/os_windows.cpp line 387:
> 
>> 385:     os::snprintf_checked(buf, sizeof(buf), "%s%s;%s%s%s",
>> 386:             Arguments::get_java_home(), EXT_DIR,
>> 387:             path, PACKAGE_DIR, EXT_DIR);
> 
> When the call is split across multiple lines like this, the subsequent lines should align with the first parameter i.e. align under `buf`.

I think the other acceptable approach is to put the first argument on the 2nd line, and then indent all the argument lines by 8. That works well if the first argument would otherwise start too far to the right. For the above, I think either approach would look ok.

-------------

PR: https://git.openjdk.org/jdk/pull/11935


More information about the serviceability-dev mailing list