Skip to content

[BUG] unclear code in MTK platform timer code #4817

@plbossart

Description

@plbossart

cppcheck throws the following warning:

src/drivers/mediatek/mt8195/timer.c:68:13: style: Redundant initialization for 'lowtimeout'. The initialized value is overwritten before it is read. [redundantInitialization]
 lowtimeout = ticks_set;
            ^
src/drivers/mediatek/mt8195/timer.c:47:22: note: lowtimeout is initialized
 uint32_t lowtimeout = ticks & 0xFFFFFFFF;
                     ^
src/drivers/mediatek/mt8195/timer.c:68:13: note: lowtimeout is overwritten
 lowtimeout = ticks_set;
            ^

the code looks suspicious, so filing as a bug. Not sure what the values for lowtimeout and hitimeout should be.

Metadata

Metadata

Labels

bugSomething isn't working as expected

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions