RFR: 8342869: Errors related to unused code on Windows after 8339120 in awt
Julian Waters
jwaters at openjdk.org
Wed Oct 23 05:12:43 UTC 2024
On Wed, 23 Oct 2024 05:07:37 GMT, Julian Waters <jwaters at 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.desktop/share/native/common/awt/debug/debug_trace.h line 66:
> 64: /* each file includes this flag indicating module trace status */
> 65: #ifdef __cplusplus
> 66: [[maybe_unused]]
I don't really know what to do about this one. The solution is messy, but it's the only one I could come up with. A static global in a header is just begging for an unused-variable error to happen
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21655#discussion_r1811859559
More information about the build-dev
mailing list