Skip to content

drivers/flash/soc_flash_nios2_qspi.c: WARNING: Unsigned expression compared with zero #11134

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

Closed
himanshujha199640 opened this issue Nov 6, 2018 · 1 comment
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@himanshujha199640
Copy link
Collaborator

Found using Coccinelle
#11132

himanshu@himanshu-Vostro-3559:~/zephyr$ ./scripts/coccicheck --mode=report --cocci=scripts/coccinelle/unsigned_lesser_than_zero.cocci --verbose=1 drivers/flash/soc_flash_nios2_qspi.c

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

Processing unsigned_lesser_than_zero.cocci
with option(s) ""

Message example to submit a patch:
 Unsigned expressions cannot be lesser than zero. Presence of
 comparisons 'unsigned (<|<=) 0' often indicates a bug,
 usually wrong type of variable.

 The semantic patch that makes this report is available
 in scripts/coccinelle/unsigned_lesser_than_zero.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Running (4 in parallel): /usr/local/bin/spatch -D report --no-show-diff --very-quiet --cocci-file scripts/coccinelle/unsigned_lesser_than_zero.cocci --patch /home/himanshu/zephyr --dir drivers/flash/soc_flash_nios2_qspi.c --jobs 4 --chunksize 1
drivers/flash/soc_flash_nios2_qspi.c:90:7-23: WARNING: Unsigned expression compared with zero.
drivers/flash/soc_flash_nios2_qspi.c:283:6-22: WARNING: Unsigned expression compared with zero.
@nashif nashif added the bug The issue is a bug, or the PR is fixing a bug label Nov 6, 2018
@galak galak added the priority: low Low impact/importance bug label Nov 20, 2018
@ramakrishnapallala
Copy link

closed as prt of #11863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants