On Thu, 23 Jul 2026 11:55:27 GMT, Matthias Baesken <[email protected]> wrote:

>> [JDK-8387298](https://bugs.openjdk.org/browse/JDK-8387298) removed the 
>> IS_WINXP macro, and the updated code in ComCtl32Util::UnsubclassHWND and 
>> ComCtl32Util::DefWindowProc doesn't use the _DefWindowProc parameter any 
>> more.
>> 
>> Thus, the _DefWindowProc parameter can be removed from these functions.
>> 
>> Removing these parameters requires updating all the usages of the functions, 
>> for example, in awt_Component.cpp, awt_Choice.cpp...
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Remove obsolete m_DefWindowProc

> m_listDefWindowProc is a class member… C++ may not issue a warning for 
> members that are never used.

Little side note regarding warnings about unused variables, clang seems to have 
a flag even for unused class members.

But MSVC, the way we set our compile flags, does not even warn about declared 
initialized unused _local_ variables.
However it has some support for this, there is warning C4189
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4189?view=msvc-170
'A variable is declared and initialized but not used.'

But as it is, we do not set this currently (warning level W3 does not include 
it, at least in my MSVC2022).

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

PR Comment: https://git.openjdk.org/jdk/pull/31814#issuecomment-5060160242

Reply via email to