On Tue, 6 Oct 2026 23:00:28 GMT, Sergey Bylokhov <[email protected]> wrote:
>> We currently disable the unused-variable warning in BUILD_LIBAWT for >> gcc/clang, this should be avoided. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > src/java.desktop/share/native/common/awt/debug/debug_trace.h line 65: > >> 63: >> 64: /* each file includes this flag indicating module trace status */ >> 65: #if defined(__GNUC__) || defined(__clang__) > > Just wonder, is this is common pattern we use in jdk? seems most of the time > we want to check the "__GNUC__" and NOT "__clang__", since __GNUC__ is > defined by the clang? Not sure if there is a common pattern. I can change to GNUC if this is more common, should I ? > src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c line 54: > >> 52: static void *awtHandle = NULL; >> 53: >> 54: typedef jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved); > > After the patch is this one unused? Why is not it detected by the compiler? It is just a typedef, I think our set of warnings does not care about it. But we can remove it if it is of no use any more. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33200#discussion_r4204613678 PR Review Comment: https://git.openjdk.org/jdk/pull/33200#discussion_r4204638663
