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 Open XL compiler warnings #7416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Deigue
Copy link
Contributor

@Deigue Deigue commented Jul 18, 2024

Changes along with the diagnostic flags:

compiler/optimizer/ValuePropagationCommon.cpp [-Wsometimes-uninitialized]
include_core/unix/zos/edcwccwi.h [-Wtrigraphs]
util/a2e/atoe.c [-Wwritable-strings]
util/a2e/headers/stdio.h [-Wwritable-strings]

@Deigue
Copy link
Contributor Author

Deigue commented Jul 24, 2024

@keithc-ca @0xdaryl I'm opening the file include_core/unix/zos/edcwccwi.h again reviewing that there was line ending issue pointed out, and I am seeing trailing whitespaces pretty much on the entire file.
Just confirming, but do I trim the whitespace for the entire file, or there is some reason why it was done like this in the first place?

@keithc-ca
Copy link
Member

I believe the check only considers lines modified in this pull request, but I would support removing trailing whitespace from all lines.

Changes along with the diagnostic flags:
compiler/optimizer/ValuePropagationCommon.cpp [-Wsometimes-uninitialized]
include_core/unix/zos/edcwccwi.h [-Wtrigraphs, removed ALL trailing whitespace]
util/a2e/atoe.c [-Wwritable-strings]
util/a2e/headers/stdio.h [-Wwritable-strings]

Signed-off-by: Gaurav Chaudhari <[email protected]>
@Deigue
Copy link
Contributor Author

Deigue commented Aug 2, 2024

Removed all the trailing whitespace from include_core/unix/zos/edcwccwi.h

@babsingh
Copy link
Contributor

jenkins build all

@@ -3295,7 +3295,7 @@ void OMR::ValuePropagation::transformRealTimeArrayCopy(TR_RealTimeArrayCopy *rtA
//create ifNodes
TR::Node *spineShiftNode = TR::Node::create(vcallNode, TR::iconst, 0, (int32_t)fe()->getArraySpineShift(elementSize));
TR::TreeTop *ifTree;
TR::Node *ifNode;
TR::Node *ifNode = nullptr;
Copy link
Contributor

@babsingh babsingh Sep 17, 2024

Choose a reason for hiding this comment

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

For consistency, can it be initialized similar to the adjacent local variables? and why is ifTree not being initialized?

Suggested change
TR::Node *ifNode = nullptr;
TR::TreeTop *ifTree = NULL;
TR::Node *ifNode = NULL;

Copy link
Contributor

Choose a reason for hiding this comment

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

In ValuePropagationCommon.cpp, there are many other uninitialized variables. Can you initialize all of them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants