On Thu, 23 Jul 2026 15:55:13 GMT, Matthias Baesken <[email protected]> wrote:

> When building a product build with additionally enabled unused initialized 
> variables warnings (e.g. C4189 MSVC warning) we get some warnings/errors in 
> libj2pkcs11 because of variables only used in debug code.
> This can and should be avoided.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Looks reasonable.

Could these declarations be moved into the existing `#ifdef DEBUG` block near 
their first use instead? That would avoid adding another preprocessor pair and 
further narrow the variables’ scopes.

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

PR Review: https://git.openjdk.org/jdk/pull/32028#pullrequestreview-4794613953

Reply via email to