On Wed, 23 Oct 2024 04:40:50 GMT, Julian Waters <jwat...@openjdk.org> wrote:

> After 8339120, gcc began catching many different instances of unused code in 
> the Windows specific codebase. Some of these seem to be bugs. I've taken the 
> effort to mark out all the relevant globals and locals that trigger the 
> unused warnings and addressed all of them by commenting out the code as 
> appropriate. I am confident that in many cases this simplistic approach of 
> commenting out code does not fix the underlying issue, and the warning 
> actually found a bug that should be fixed. In these instances, I will be 
> aiming to fix these bugs with help from reviewers, so I recommend anyone 
> reviewing who knows more about the code than I do to see whether there is 
> indeed a bug that needs fixing in a different way than what I did

src/java.base/share/native/libzip/zip_util.c line 1:

> 1: /*

Not my area but this fix looks reasonable.

src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c line 970:

> 968:  // int got = 0;
> 969: 
> 970: /*

Don't understand this one at all - what did gcc actually complain about here? 
This code all seems used.

src/java.base/windows/native/libjava/TimeZone_md.c line 235:

> 233:         TziValue tempTzi;
> 234:         WCHAR *stdNamePtr = tzi.StandardName;
> 235:      // int onlyMapID;

Looks like this became unused with JDK-8209167, so deleting it seems fine to me.

src/java.base/windows/native/libnet/NTLMAuthSequence.c line 50:

> 48: static jfieldID status_seqCompleteID;
> 49: 
> 50: // static HINSTANCE lib = NULL;

Looks like this became unused with JDK-7030256, so removal seems fine.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21654#discussion_r1821924616
PR Review Comment: https://git.openjdk.org/jdk/pull/21654#discussion_r1821922770
PR Review Comment: https://git.openjdk.org/jdk/pull/21654#discussion_r1821929205
PR Review Comment: https://git.openjdk.org/jdk/pull/21654#discussion_r1821934247

Reply via email to