Skip to content

Conversation

@keith-packard
Copy link
Contributor

When the renesas-rv-lvd driver is built with SDK 1.0 using GCC 14, the compiler emits a spurious uninitialized variable warning because it can't follow the control flow to figure out that the variable wasn't ever used without being initialized. Work around this by simply initializing it to one of the valid values.

Copy link
Member

@soburi soburi left a comment

Choose a reason for hiding this comment

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

Message prefix is shuold better as drivers: comparator: .

When the renesas-rv-lvd driver is built with SDK 1.0 using GCC 14, the
compiler emits a spurious uninitialized variable warning because it can't
follow the control flow to figure out that the variable wasn't ever used
without being initialized. Work around this by simply initializing it
to one of the valid values.

Signed-off-by: Keith Packard <[email protected]>
@keith-packard keith-packard changed the title drivers/comparator: Silence GCC 14 uninitialized variable warning. drivers: comparator: Silence GCC 14 uninitialized variable warning. Oct 31, 2025
@sonarqubecloud
Copy link

@nashif nashif modified the milestones: v4.4.0, v4.3.0 Oct 31, 2025
@cfriedt
Copy link
Member

cfriedt commented Nov 3, 2025

@keith-packard - can you please link a bug report to this PR? It's required past RC2

@keith-packard
Copy link
Contributor Author

@keith-packard - can you please link a bug report to this PR? It's required past RC2

It only fails with SDK 1.0, not SDK 0.17, so I'm not sure this should be considered for 4.3?

@jhedberg jhedberg merged commit 3e615fa into zephyrproject-rtos:main Nov 4, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Comparator platform: Renesas RA Renesas Electronics Corporation, RA size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.