On Wed, 7 Oct 2026 10:25:16 GMT, Matthias Baesken <[email protected]> wrote:

>> make/modules/java.desktop/lib/AwtLibraries.gmk line 136:
>> 
>>> 134:     DISABLED_WARNINGS_clang_awt_ImagingLib.c := 
>>> deprecated-non-prototype, \
>>> 135:     DISABLED_WARNINGS_clang_debug_assert.c := unused-variable, \
>>> 136:     DISABLED_WARNINGS_clang_debug_mem.c := unused-variable, \
>> 
>> possibly we can update the code instead?
>
> maybe, but in debug_mem  we explicitly state this
> 
> /* The following line is only here to prevent compiler warnings
>  * on release (non-debug) builds
>  */
> static int dummyVariable = 0;
> 
> 
> So if we **want** unused vars, I cannot do much about it.  But not sure how 
> good this dummyVariable 'trick' really is.

We could probably use `__attribute__((unused))`  for gcc/clang on the variable, 
but is this really better than what I do in the makefile?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33200#discussion_r4205817195

Reply via email to