Skip to content

test: placate Clang's --Wbitwise-instead-of-logical - #19045

Closed
paulidale wants to merge 1 commit into
openssl:openssl-3.0from
paulidale:test-test-30
Closed

paulidale wants to merge 1 commit into
openssl:openssl-3.0from
paulidale:test-test-30

Conversation

@paulidale

Copy link
Copy Markdown
Contributor

Back port to 3.0 because it fixes an error in test-test.

test: placate Clang's --Wbitwise-instead-of-logical

test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning

Originally the fix for #18639

Fixes #19024

  • documentation is added or updated
  • tests are added or updated

```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Originally the fix for openssl#18639

Fixes openssl#19024
@paulidale paulidale added approval: review pending This pull request needs review by a committer approval: otc review pending triaged: bug The issue/pr is/fixes a bug branch: 3.0 Applies to openssl-3.0 branch (EOL) labels Aug 23, 2022
@paulidale paulidale self-assigned this Aug 23, 2022
@mattcaswell mattcaswell added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Aug 23, 2022
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Aug 24, 2022
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Aug 24, 2022
@t8m

t8m commented Aug 24, 2022

Copy link
Copy Markdown
Member

Merged to 3.0 branch. Thank you.

@t8m t8m closed this Aug 24, 2022
openssl-machine pushed a commit that referenced this pull request Aug 24, 2022
```
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
test/test_test.c:58:9: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
    if (!TEST(1, TEST_uint_eq(3u, 3u))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test/test_test.c:58:9: note: cast one or both operands to int to silence this warning
```

Originally the fix for #18639

Fixes #19024

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #19045)
@paulidale
paulidale deleted the test-test-30 branch September 5, 2022 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: 3.0 Applies to openssl-3.0 branch (EOL) triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants