Skip to content

Set initial value of can_id to avoid maybe-uninitialized errors#1455

Merged
hikinggrass merged 2 commits into
EVerest:mainfrom
matteocarnelos:patch-1
Oct 27, 2025
Merged

Set initial value of can_id to avoid maybe-uninitialized errors#1455
hikinggrass merged 2 commits into
EVerest:mainfrom
matteocarnelos:patch-1

Conversation

@matteocarnelos
Copy link
Copy Markdown
Contributor

Describe your changes

Initialize can_id to avoid maybe-uninitialized error while compiling with -Werror enabled. In particular, give can_id an initial value of 0 and avoid modifying the given dataset if the receive operation was not successful.

Issue ticket number and link

Fixes #1451.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

Initialize `can_id` to avoid `maybe-uninitialized` error while compiling with `-Werror` enabled.

Fixes #1451.

Signed-off-by: Matteo Carnelos <matteo.carnelos98@gmail.com>
Signed-off-by: Matteo Carnelos <matteo.carnelos98@gmail.com>
@hikinggrass hikinggrass added this pull request to the merge queue Oct 27, 2025
Merged via the queue into EVerest:main with commit 0315d7a Oct 27, 2025
18 of 19 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.

Compilation of 2025.9.0 fails due to maybe-uninitialized error

2 participants