FW: fix issues exposed by codechecker - #256
Conversation
|
Build output available: |
CodeChecker static analysis✅ No non-style issues found. |
|
Build output available: |
2a83a4d to
fa9f7c5
Compare
|
Build output available: |
|
Build output available: |
e509194 to
5c96030
Compare
|
Build output available: |
|
Build output available: |
|
Build output available: |
fc1d581 to
102bf62
Compare
|
Build output available: |
102bf62 to
376d6e2
Compare
|
Build output available: |
376d6e2 to
1a71b9f
Compare
|
Build output available: |
1a71b9f to
afe5f09
Compare
|
Build output available: |
Include the standard and project headers that declare functions used by each translation unit. This lets Clang analyze the files independently instead of relying on transitive includes.
Document the intended loss of precision when storing sensor and parsed values in 32-bit fields. Match variadic format arguments to the unsigned integer type expected by %X while preserving the existing lower-32-bit output.
Call std::fabs for the battery-capacity difference so overload resolution is explicit and the comparison remains in floating-point arithmetic.
The connection callback returns void, so stop processing with a plain return after a parameter-update failure instead of attempting to return the error value.
Initialize the application LED state and BMP388 FIFO sample data before they are passed to downstream code. This prevents uninitialized fields from being observed on valid error and partial-frame paths.
Only adjust and consume the FIFO length after reading it successfully. This avoids updating FIFO state or issuing a read with an undefined length after an I/O failure.
Return before selecting the Earable button when the callback does not contain its pin. This prevents dereferencing an uninitialized button pointer for an unexpected interrupt mask.
Reuse the released TX buffer when no alternative buffer is available so tx_buf cannot remain null before memset().
Validate the stereo channel count before consuming both channel pointers. If encoding fails, drop the frame instead of entering the fatal error path, log once until recovery, and never send stale encoded data.
Initialize the conditionally compiled scan parameter to NULL and describe the chip-ID copy in terms of its actual alignment and aliasing constraints.
Continue through volume and mute restoration when a codec step fails, return the first error, and only persist the requested mode after all hardware operations succeed.
afe5f09 to
dcd8df4
Compare
|
Build output available: |
Fix issues exposed by CodeChecker workflow
Some CodeChecker findings were intentionally silenced while preserving existing behavior instead of redesigning the underlying error handling. For example, several ignored driver return values were made explicit with
(void)casts.Possible follow-up issues:
(void).bmp3_init()failures and ensure FIFO pressure compensation only uses valid temperature data.