RFR: 8198918: jio_snprintf and friends are not checked by -Wformat

Afshin Zafari azafari at openjdk.org
Tue Sep 26 11:53:41 UTC 2023


- The `ATTRIBUTE_PRINTF` usage in cpp files is useless. They are removed.
-  There are cases where `jio_xxprintf` functions use `char *` arguments for format string, rather than a literal like `"%s..."`. These cases are not compiled when `ATTRIBUTE_PRINTF` is used for them. So, I use the attribute and got the corresponding compile errors. Then I fixed the issues and remove the attribute when all fixed.
-
### Test
The changes are tested on all platforms tiers 1-4.

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

Commit messages:
 - 8198918: jio_snprintf and friends are not checked by -Wformat

Changes: https://git.openjdk.org/jdk/pull/15918/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15918&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8198918
  Stats: 13 lines in 5 files changed: 0 ins; 5 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/15918.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15918/head:pull/15918

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


More information about the hotspot-dev mailing list