-
Notifications
You must be signed in to change notification settings - Fork 328
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
Fix Checkpatch and Sparse tool warnings #885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of all this non-functional churn, which will only generate more changes between riscv-openocd and upstream. But I guess it needs to be done, and I assume every change here is because a tool is enforcing that style now.
If it possible to make a github workflow that automatically runs Sparse, similar to how we currently run checkpatch?
Yes possible. The easy way, just need a reference for the current head. It might be a counter or a log file that we can compare. |
Looks like this PR now has a conflict. |
1618d03
to
a6bb3a6
Compare
Rebased and fixed. |
a6bb3a6
to
47e2f3b
Compare
@timsifive can we merge this? |
Below warnings are fixed. 1- A function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 2- error: variable set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I1cf14b8e5e3e732ebc9cacc4b1cb9009276a8ea9 Reviewed-on: https://review.openocd.org/c/openocd/+/7569 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Besides checkpatch, now upstream codes are scanning with Sparse semantic checker tool. This commit addresses some Sparse and checkpatch warnings. Change-Id: I0e3e9f15220d8829c5708897af27aa86a8f90c07 Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
47e2f3b
to
617f62a
Compare
We have fixed several warnings in our fork. https://github.com/espressif/openocd-esp32
I would like to fix them also here. This will be helpful when/if you want to upstream your commits.
Additionally cherry-picked a commit from upstream to fix build errors on the Clang compiler.
Remaining Sparse warnings:
https://github.com/erhankur/riscv-openocd/actions/runs/5548680099/jobs/10131935209?pr=3#step:5:3064
Most of them can be fixed by adding ULL or LL to 64-bit macros inside encoding.h
I can fix them after getting your opinion.