Skip to content
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

Fix string literal conversion warnings in codegen and il #18465

Merged
merged 3 commits into from
Dec 13, 2023

Conversation

dylanjtuttle
Copy link
Contributor

@dylanjtuttle dylanjtuttle commented Nov 16, 2023

Work towards fixing AIX warnings about assigning string literals to non-const char pointers by adding 'const' qualifiers to some string variables and parameters (or worst case scenario, casting to (char *)) in runtime/compiler/codegen and runtime/compiler/il.

This PR contributes to (but does not close) #14859

This PR must be merged in coordination with eclipse-omr/omr#7185

@dylanjtuttle dylanjtuttle changed the title Fix -Wwritable-strings in codegen and il Fix string literal conversion warnings in codegen and il Nov 22, 2023
@hzongaro
Copy link
Member

I notice that pull request eclipse-omr/omr#7185 contains changes to add const to nameOfGlobal and _globalValueNames. Similar declarations of nameOfGlobal and _globalValueNames don't seem to have needed to be made const in any of your pull requests for OpenJ9. Do you happen to know why?

@dylanjtuttle
Copy link
Contributor Author

Do you happen to know why?

Honestly I don't think I ever noticed the inconsistency. Fixed!

@hzongaro hzongaro self-assigned this Dec 11, 2023
runtime/compiler/codegen/J9CodeGenerator.cpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9CodeGenerator.cpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9CodeGenerator.hpp Show resolved Hide resolved
runtime/compiler/il/J9DataTypes.hpp Outdated Show resolved Hide resolved
runtime/compiler/il/J9DataTypes.hpp Outdated Show resolved Hide resolved
runtime/compiler/runtime/RelocationRuntime.hpp Outdated Show resolved Hide resolved
@hzongaro hzongaro added comp:jit depends:omr Pull request is dependent on a corresponding change in OMR labels Dec 12, 2023
Copy link
Member

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the updates!

@hzongaro
Copy link
Member

@dylanjtuttle, may I ask you to squash the new commit that addresses review comments into the other existing commits?

@hzongaro
Copy link
Member

Jenkins test sanity.functional,sanity.openjdk all jdk8,jdk11,jdk17,jdk21 depends eclipse-omr/omr#7185

Fix string literal conversion warnings in runtime/compiler/codegen

Signed-off-by: Dylan Tuttle <[email protected]>
Fix string literal conversion warnings in runtime/compiler/il

Signed-off-by: Dylan Tuttle <[email protected]>
Fix string literal conversion warnings in runtime/compiler/runtime

Signed-off-by: Dylan Tuttle <[email protected]>
@hzongaro hzongaro merged commit 9785c66 into eclipse-openj9:master Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit depends:omr Pull request is dependent on a corresponding change in OMR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants