Native code in SA (libsaproc) currently has two functions for reporting messages: `print_error()` for reporting errors, and `print_debug()` for reporting debug messages when `LIBSAPROC_DEBUG` is set.
During the discussion of [JDK-8391940](https://bugs.openjdk.org/browse/JDK-8391940), `print_warning()` was proposed for reporting messages that are useful for users to see but do not indicate an error. Currently, some messages are reported using `print_debug()`. As a result, users have to set `LIBSAPROC_DEBUG=1` to see them and then find the relevant messages among the noisy debug output. Add a new `print_warning()` function that is always enabled and writes to stdout, so that useful diagnostic messages can be reported without being treated as errors. Migrate appropriate messages currently reported using `print_error()` or `print_debug()` to use `print_warning()`. I replaced to use `print_waring()` if the message is worth to notice, and the process should be continued. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8392120: Add a warning facility for SA Changes: https://git.openjdk.org/jdk/pull/33047/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33047&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8392120 Stats: 37 lines in 8 files changed: 18 ins; 0 del; 19 mod Patch: https://git.openjdk.org/jdk/pull/33047.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33047/head:pull/33047 PR: https://git.openjdk.org/jdk/pull/33047
