Skip to content

Conversation

@nakulselfdiscovery
Copy link
Contributor

@nakulselfdiscovery nakulselfdiscovery commented Jan 10, 2026

Fixes following error on enabling DEBUG logs:
zephyrproject/zephyr/scripts/native_simulator//native/src/timer_model.c: In function ‘hwtimer_tick_timer_reached’: zephyrproject/zephyr/scripts/native_simulator//native/src/timer_model.c:194:35: error: format ‘%lli’ expects argument of type ‘long long int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=format=] 194 | printf("tick @%5llims: diff = expected_rt - real_time = " | ~~~~^ | | | long long int | %5li 195 | "%5lli = %s - %s\n", 196 | hw_timer_tick_timer/1000U, diff, es, rs); | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | uint64_t {aka long unsigned int} zephyrproject/zephyr/scripts/native_simulator//native/src/timer_model.c:194:24: error: format ‘%lli’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t’ {aka ‘long int’} [-Werror=format=] 194 | printf("tick @%5llims: diff = expected_rt - real_time = " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 195 | "%5lli = %s - %s\n", 196 | hw_timer_tick_timer/1000U, diff, es, rs); | ~~~~ | | | int64_t {aka long int} zephyrproject/zephyr/scripts/native_simulator//native/src/timer_model.c:195:30: note: format string is defined here 195 | "%5lli = %s - %s\n", | ~~~~^ | | | long long int | %5li cc1: all warnings being treated as errors

@nakulselfdiscovery
Copy link
Contributor Author

@aescolar
please have at look at minor fix, will raise similar PR for zephyr clone as well.

Signed-off-by: nakulselfdiscovery <nakulchauhan111@gmail.com>
@nakulselfdiscovery nakulselfdiscovery force-pushed the nakul/timer_model_compilation_fix branch from 7e70a6e to 30084f3 Compare January 12, 2026 08:43
@aescolar
Copy link
Contributor

aescolar commented Jan 12, 2026

please have at look at minor fix, will raise similar PR for zephyr clone as well.

Ok, give me a couple of hours to come back to this, it is a trivial fix but it is not correct, I will just fix it for you.

@aescolar
Copy link
Contributor

aescolar commented Jan 12, 2026

@nakulselfdiscovery the fix would be something like this
215ee859eee5e49dc09eda8f17a956ee7318caf2
but for the DCO the author and signoff need to match your real name. Please tell if the ones in that commit are the correct ones, and if you are ok with it being changed as in that commit and I will just merge it.

This would then be a matching Zephyr commit:
aescolar/zephyr@5760480

@nakulselfdiscovery
Copy link
Contributor Author

@nakulselfdiscovery the fix would be something like this 215ee859eee5e49dc09eda8f17a956ee7318caf2 but for the DCO the author and signoff need to match your real name. Please tell if the ones in that commit are the correct ones, and if you are ok with it being changed as in that commit and I will just merge it.

This would then be a matching Zephyr commit: aescolar/zephyr@5760480

I am fine with DCO, you can merge it. @aescolar

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants