[GH-ISSUE #1208] New warning -Wpointer-bool-conversion in dynamic_fmt.c with clang version 3.7.0 (trunk 235131) #757

Closed
opened 2026-10-14 03:22:46 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @frank-dittrich on GitHub (Apr 17, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1208

Originally assigned to: @jfoug on GitHub.

I used CC=clang CFLAGS="-O2 -mavx" ./configure --disable-native-tests to avoid avx2.

dynamic_fmt.c:8045:39: warning: address of array 'pPriv->dynamic_WHICH_TYPE_SIG' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (!ciphertext || !pPriv || !pPriv->dynamic_WHICH_TYPE_SIG) return 0;
                                     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Make process completed.

May be it was intended to test pPriv->dynamic_WHICH_TYPE_SIG[0] instead of pPriv->dynamic_WHICH_TYPE_SIG here.

Originally created by @frank-dittrich on GitHub (Apr 17, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1208 Originally assigned to: @jfoug on GitHub. I used `CC=clang CFLAGS="-O2 -mavx" ./configure --disable-native-tests` to avoid avx2. ``` dynamic_fmt.c:8045:39: warning: address of array 'pPriv->dynamic_WHICH_TYPE_SIG' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!ciphertext || !pPriv || !pPriv->dynamic_WHICH_TYPE_SIG) return 0; ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Make process completed. ``` May be it was intended to test `pPriv->dynamic_WHICH_TYPE_SIG[0]` instead of `pPriv->dynamic_WHICH_TYPE_SIG` here.
bsakaguchi 2026-10-14 03:22:46 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#757
No description provided.