Skip to content

Update bmp5.c#4

Open
Kampi wants to merge 1 commit into
boschsensortec:masterfrom
Kampi:Fix_Wmaybe-uninitialized
Open

Update bmp5.c#4
Kampi wants to merge 1 commit into
boschsensortec:masterfrom
Kampi:Fix_Wmaybe-uninitialized

Conversation

@Kampi

@Kampi Kampi commented Feb 27, 2024

Copy link
Copy Markdown

Fix "'fifo_len' may be used uninitialized" warning in bmp5.c

Fix "'fifo_len' may be used uninitialized" warning
MalcolmWilliams added a commit to MalcolmWilliams/BMP5_SensorAPI that referenced this pull request Nov 6, 2025
Bosch doesn't seem to want to merge this fix: boschsensortec#4

The wearable-firmware treats warnings as an error (and I don't want to just ignore the warning).
```
Compiling file: bmp5.c
./lib/bmp5/BMP5_SensorAPI/bmp5.c: In function 'bmp5_get_fifo_data':
./lib/bmp5/BMP5_SensorAPI/bmp5.c:1144:30: error: 'fifo_len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1144 |                 fifo->length = fifo_len;
      |                 ~~~~~~~~~~~~~^~~~~~~~~~
cc1: all warnings being treated as errors
```
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.

1 participant