On Wed, 9 Sep 2026 09:20:12 GMT, Matthias Baesken <[email protected]> wrote:
> BUILD_LIBNET and BUILD_LIBNIO switch off the unused-variable warning for some > compilation units. This should be avoided. > Additionally isSourceFilterSupported in Net.c where one of those warnings > pops up can be completely removed. That coding was only for AIX 6.X (old OS > versions no longer supported). > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). The `Lib.gmk` file will need a copyright year update. src/java.base/unix/native/libnio/ch/Net.c line 694: > 692: struct ipv6_mreq mreq6; > 693: #ifndef __APPLE__ > 694: struct group_source_req req; Hello Matthias, would it be more appropriate to move this declaration directly into the `#else` block where the call to `initGroupSourceReq()` function happens for non-Apple platforms? I don't know if there are specific guidelines in the JDK C code which require us to declare the function variables right at the beginning of the function. ------------- PR Comment: https://git.openjdk.org/jdk/pull/32782#issuecomment-5601972736 PR Review Comment: https://git.openjdk.org/jdk/pull/32782#discussion_r3968403930
