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

fabtests: Fix compiler warning about unitialized variable #10500

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

j-xiong
Copy link
Contributor

@j-xiong j-xiong commented Oct 29, 2024

The compiler can't properly follow the def-use chain guarded by the same condition and complains about the variable could be used w/o initialization:

if (atomic == FI_ATOMIC_COMPARE) {
    check_cmp =  ...;
}
......
if (atomic == FI_ATOMIC_COMPARE) {
    use check_cmp in macro
}

The compiler can't properly follow the def-use chain guarded by the
same condition and complains about the variable could be used w/o
initialization:

    if (atomic == FI_ATOMIC_COMPARE) {
        check_cmp =  ...;
    }
    ......
    if (atomic == FI_ATOMIC_COMPARE) {
        use check_cmp in macro
    }

Signed-off-by: Jianxin Xiong <[email protected]>
Copy link
Contributor

@aingerson aingerson left a comment

Choose a reason for hiding this comment

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

Silly compiler. Thanks!

@j-xiong j-xiong merged commit 6cdfb7e into ofiwg:main Oct 30, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants