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
bluetooth: shell: Lots of checks of type (unsigned < 0) which is bogus #54101
Comments
@finikorg Do you have a way to generate the full list? It's quite an effort if someone manually have to go through each |
No, I cannot, but I think it does make sense to check them all, there are other bugs like checking (uint32 > UINT32_MAX), etc. |
You may be right :) Looks like we have a total of 286 calls to
There are several discussions going on with using But yeah, without a predefined list, fixing this issue may take quite a while, as it is low priority but high effort. I can put in the work to fix this for the audio shell modules. |
Fixing all LE Audio (and ISO) shell |
@finikorg I think I fixed all the bugs in the LE audio files. Please review :) |
@finikorg Can you verify if there are still some missing in the non-LE Audio files? |
Thanks. I think all fixed, I let you know if there are some bugs left. |
Unsigned cannot be less then zero so there is no need to check for it.
Example of checks:
zephyr/subsys/bluetooth/shell/bap_broadcast_assistant.c
Lines 315 to 316 in cf871ae
or
zephyr/subsys/bluetooth/shell/bap_broadcast_assistant.c
Lines 321 to 322 in cf871ae
etc
The text was updated successfully, but these errors were encountered: