Skip to content
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

CodeQL and build warning fixes #192

Merged
merged 2 commits into from
Feb 5, 2025
Merged

Conversation

henrygab
Copy link

@henrygab henrygab commented Dec 31, 2024

Enabled CodeQL in the buspirate firmware project ... an awesome tool built around RP2040 and RP2350. CodeQL automatically caught a number of errors in picotool.

This resolves those errors (and a few more besides).

  • Fix: Too few arguments to formatting function
  • Fix: Wrong type of arguments to formatting function
    • size_t uses format specifier z
    • uint32_t uses format specifier PRIx32
  • Fix: comparison of integer expressions of different signedness [-Wsign-compare]
  • Fix: 'expected_redundancy' may be used uninitialized [-Wmaybe-uninitialized]

* Fix: operation on 'i' may be undefined [-Wsequence-point]

Fixes various errors automaticallly detected by CodeQL.

* Too few arguments to formatting function
* Wrong type of arguments to formatting function
  * `size_t` uses format specifier `z`
  * `uint32_t` uses format specifier `PRIx32`

Also fix various build warnings.
* Fix: comparison of integer expressions of different signedness [-Wsign-compare]
* Fix: operation on 'i' may be undefined [-Wsequence-point]
* Fix: 'expected_redundancy' may be used uninitialized [-Wmaybe-uninitialized]
@will-v-pi
Copy link
Contributor

Can you target this PR at the develop branch instead of master

bintool/metadata.h Outdated Show resolved Hide resolved
@henrygab henrygab changed the base branch from master to develop January 8, 2025 03:06
@henrygab
Copy link
Author

Can you target this PR at the develop branch instead of master

@will-v-pi -- Done ... Could you please let me know if there's something more needed? Thank you.

@henrygab
Copy link
Author

@will-v-pi -- Would you be able to help set expectations on the timeline? Do these typically take a few days, a week, a few weeks, a month, many months? If they tend to take a while, do you rely on submitted to rebase or merge? Thanks for helping me, to avoid bothering you!

@will-v-pi
Copy link
Contributor

The timeline could be a few weeks to a few months, depending on how busy we are, and how useful a feature the PR is adding. We'd rely on you to rebase if any merge conflicts arise.

Copy link
Contributor

@will-v-pi will-v-pi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'm happy with these changes, so will merge this

@will-v-pi will-v-pi merged commit 80be8bc into raspberrypi:develop Feb 5, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants