-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8342868: Errors related to unused code on Windows after 8339120 in core libs #21654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back jwaters! A progress list of the required criteria for merging this PR into |
|
@TheShermanTanker This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 3566 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@TheShermanTanker The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
Bumping, please advise on whether the fixes are correct or not |
| int got = 0; | ||
| // int got = 0; | ||
|
|
||
| /* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't understand this one at all - what did gcc actually complain about here? This code all seems used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem a bug, where the return value is not handled correctly. Can you please file a separate bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look at getLocaleInfoWrapper and it seems like it has no side effects, its only purpose is to return a value
While got is not needed here, I am not convinced that getLocaleInfoWrapper is not used, so we shouldn't comment out all of the code, but rather just remove got. getLocaleInfoWrapper updates the outbound variable pattern (see https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getlocaleinfoex), which is used to get the right string pattern from fixes.
Usually, based on got, appropriate action is taken, but that's not needed in this case, because pattern is either updated or remains its fallback 0 value. So I presume that is why got is ignored in this case.
We could just add that got removal to this patch, what do you think @naotoj?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Justin. That is correct. Only pattern is relevant here. No need to check got so it can safely be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my area but this fix looks reasonable.
| TziValue tempTzi; | ||
| WCHAR *stdNamePtr = tzi.StandardName; | ||
| int onlyMapID; | ||
| // int onlyMapID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this became unused with JDK-8209167, so deleting it seems fine to me.
| static jfieldID status_seqCompleteID; | ||
|
|
||
| static HINSTANCE lib = NULL; | ||
| // static HINSTANCE lib = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this became unused with JDK-7030256, so removal seems fine.
justin-curtis-lu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locale and TimeZone files LGTM. I also think its safe to just delete the offending onlyMapID and got (as opposed to commenting), since there is no bug and they are simply unusued.
|
Thanks for the reviews! I would delete them entirely, but I don't want to invalidate the existing reviews and force you guys to re-approve again :( |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Keep it open Skara, I'm waiting for the other Pull Requests to be approved so I can do them all at once |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Stop asking, I still need awt and accessibility to be approved :( |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Keep open please |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Keep open please |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Keep it open please. Life is not being kind to me at the moment, I apologize for the delays |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
Stay open |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
|
/touch |
|
@TheShermanTanker The pull request is being re-evaluated and the inactivity timeout has been reset. |
|
@TheShermanTanker This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
|
/touch |
|
@TheShermanTanker The pull request is being re-evaluated and the inactivity timeout has been reset. |
|
Hello @TheShermanTanker, I see that this PR is marked as ready for integration since several months. But there's also your comment which says:
I don't see any client area changes in this PR. Is there anything that's needed to be done to move forward with integrating this? I don't mean that you should integrate it "now" - I see that this branch hasn't been merged against master branch for several months, so that would be the first thing to do. |
|
Sorry for waiting so long. It's become clear that I won't be able to get awt and accessibility up to speed for a long time, so I will go ahead with this one first |
|
/integrate |
|
Going to push as commit bbc5c98.
Your commit was automatically rebased without conflicts. |
|
@TheShermanTanker Pushed as commit bbc5c98. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
@TheShermanTanker the commented out code really should have been deleted, not just left commented out. Please file anpther JBS issue to have this cleaned up so it is not forgotten. Thanks. |
It's usually risky to be integrating a PR which is so far behind the master branch, without first merging the latest changes and running the tier tests. In this case it hasn't caused any failures in the tier testing so far. |
I'll keep that in mind next time I'm submitting another Pull Request. Fortunately in this case the code touched was dead code and in an area that isn't touched often, so shouldn't cause major issues |
|
@dholmes-ora Sorry about that. Here's the issue as was requested: https://bugs.openjdk.org/browse/JDK-8361593 |
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
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21654/head:pull/21654$ git checkout pull/21654Update a local copy of the PR:
$ git checkout pull/21654$ git pull https://git.openjdk.org/jdk.git pull/21654/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21654View PR using the GUI difftool:
$ git pr show -t 21654Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21654.diff
Using Webrev
Link to Webrev Comment