Skip to content

Conversation

tpambor
Copy link
Contributor

@tpambor tpambor commented Oct 21, 2025

Correct the error message in case counter failed to set top value. A format specifier for the error code was present in the zassert string but the error code was not passed to the zassert function causing a -Wformat error.

Fixes #97834

@zephyrbot zephyrbot added area: Counter area: Tests Issues related to a particular existing or missing test labels Oct 21, 2025
Correct the error message in case counter failed to set top value.
A format specifier for the error code was present in the zassert
string but the error code was not passed to the zassert function
causing a -Wformat error.

Signed-off-by: Tim Pambor <[email protected]>
err = counter_set_top_value(dev, &top_cfg);
zassert_equal(-ENOTSUP, err,
"%s: Counter failed to set top value: %d", dev->name);
"%s: Counter failed to set top value (err: %d)", dev->name, err);
Copy link
Contributor

@JarmouniA JarmouniA Oct 21, 2025

Choose a reason for hiding this comment

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

Only this change is a fix, the others are rather enhancements, should go in a separate commit.

https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-requirements
"Distinct, Logical Units of Change
(...)For example, adding a feature, fixing a bug, or refactoring existing code should be separate commits"

Copy link
Member

Choose a reason for hiding this comment

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

I don't want two commits for such related change really

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Counter area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: counter: counter_callback.single_shot_alarm_notop build failure for frdm_k64f

5 participants