RFR: 8311575: Fix invalid format parameters [v2]
Daniel Jeliński
djelinski at openjdk.org
Fri Jul 7 08:41:05 UTC 2023
On Fri, 7 Jul 2023 07:40:35 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add newlines
>
> src/hotspot/os/windows/perfMemory_windows.cpp line 225:
>
>> 223: // unexpected error, declare the path insecure
>> 224: if (PrintMiscellaneous && Verbose) {
>> 225: warning("could not get attributes for file %s: ",
>
> Too bad ATTRIBUTE_PRINTF is empty for Windows. Visual Studio doesn't seem to be an equivalent to
> gcc's `__attribute__((format(printf(...)))`.
The best I could find in Visual Studio was [_Printf_format_string_](https://learn.microsoft.com/en-us/cpp/code-quality/annotating-function-parameters-and-return-values?view=msvc-170#format-string-parameters)
It needs to be specified next to the parameter, and it's only checked when compiling with `-analyze`, so not really useful for us at this moment.
> src/hotspot/share/runtime/arguments.cpp line 2858:
>
>> 2856: if (!JVMCIGlobals::enable_jvmci_product_mode(origin, use_graal_jit)) {
>> 2857: jio_fprintf(defaultStream::error_stream(),
>> 2858: "Unable to enable JVMCI in product mode");
>
> [pre-existing] Unusual indentation.
This kind of indentation is pretty common in this file. I'd rather not touch it here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14783#discussion_r1255462927
PR Review Comment: https://git.openjdk.org/jdk/pull/14783#discussion_r1255469856
More information about the hotspot-dev
mailing list