On Wed, 30 Oct 2024 05:51:30 GMT, David Holmes <dhol...@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/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.

The warning received is that got is set but not used - I had a look at 
getLocaleInfoWrapper and it seems like it has no side effects, its only purpose 
is to return a value, which is the variable got in this case. I'm pretty 
certain got not being used is a bug, and that it is needed somewhere, but 
someone forgot to hook it up to whatever needs it

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21654#discussion_r1821943323

Reply via email to