On Tue, 23 Jun 2026 15:17:59 GMT, Matthias Baesken <[email protected]> wrote:

> BUILD_LIBMANAGEMENT_EXT disables some warnings; this should be removed.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

I keep the
DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral,
because I have not a good fix for this.
It comes from this clang warning

jdk/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c:163:26:
 error: format string is not a string literal [-Werror,-Wformat-nonliteral]
  163 |         n = vsscanf(tmp, fmt, args);

Adding an attribute to the function does not work, because then it warns that 
the function is not variadic.
Moving all used format specifiers into the function does not really look like a 
great solution.
Using pragma to get around the issue looks worse than disabling the warning.

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

PR Comment: https://git.openjdk.org/jdk/pull/31636#issuecomment-4786693121

Reply via email to