8378180: Compiling OpenJDK with C23 C-Compiler gives warning: initialization discards ‘const’ qualifier from pointer target type#577
Conversation
|
👋 Welcome back fthevenet! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
Webrevs
|
|
/approval request I'd like to backport this to JDK 25. Motivation: This patch is needed in order to build jdk26u with more recent version of gcc (16.1.1+), as it fixes compiler warnings. The change introduces no behaviour change and, I believe, is low risk. I have verified that building jdk25u with this patch results in no warning when using gcc 16.1.1 on Fedora 44 |
|
@fthevenet |
phohensee
left a comment
There was a problem hiding this comment.
In NetworkInterface.c, you've imported a new macro CHECKED_MALLOC4, which isn't in the original commit.
Yes, that indeed looks fishy. thanks for catching that. |
|
The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork: git checkout backport-fthevenet-76a44b3e-master
git fetch https://git.openjdk.org/jdk25u-dev.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
I had indeed missed that the changes to |
|
Hi @fthevenet, please resolve the conflicts. |
|
Hi @GoeLin
Done, but this cannot be integrated for the moment as this change incorrectly introduce code from a different change.
Do you confirm that this is the right approach? |
Hi all,
This pull request contains a backport of commit 76a44b3e from the openjdk/jdk repository.
The commit being backported was authored by Jasmine Karthikeyan on 22 Apr 2026 and was reviewed by Daniel Jeliński and Alan Bateman.
This patch is needed in order to build jdk26u with more recent version of gcc (16.1.1+), as it fixes compiler warnings.
Backport is almost clean except for a conflicting copyright year in NetworkInterface.c.
Thanks!
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/577/head:pull/577$ git checkout pull/577Update a local copy of the PR:
$ git checkout pull/577$ git pull https://git.openjdk.org/jdk25u-dev.git pull/577/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 577View PR using the GUI difftool:
$ git pr show -t 577Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/577.diff
Using Webrev
Link to Webrev Comment