Skip to content

Conversation

@avisconti
Copy link
Contributor

@avisconti avisconti commented May 3, 2019

The LL_I2S_ReadReg() function returns uint32_t, while %d requires 'int' as a type.

This PR fixes following warning:

zephyr/drivers/i2s/i2s_ll_stm32.c: In function 'i2s_stm32_isr':
zephyr/drivers/i2s/i2s_ll_stm32.c:612:28: warning: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t' {aka 'volatile long unsigned int'} [-Wformat=]
LOG_ERR("%s: err=%d", func, LL_I2S_ReadReg(cfg->i2s, SR));
^~~~~~~~~~~~ ~~~~~~~~~~~~

It has been noted when CONFIG_NEWLIB_LIBC is enabled.
It should fix #15566 (@overheat) and potentially #14111

The LL_I2S_ReadReg() function returns uint32_t, while %d requires
'int' as a type.

Signed-off-by: Armando Visconti <[email protected]>
@avisconti avisconti added bug The issue is a bug, or the PR is fixing a bug area: Drivers area: Logging backport v1.14-branch labels May 3, 2019
@avisconti avisconti requested a review from galak May 3, 2019 14:02
@avisconti avisconti self-assigned this May 3, 2019
@avisconti avisconti mentioned this pull request May 3, 2019
@avisconti
Copy link
Contributor Author

@overheat, pls check if the CI in #15566 is now fixed with this commit.

@ioannisg ioannisg requested a review from erwango May 3, 2019 23:07
@ioannisg ioannisg added the platform: STM32 ST Micro STM32 label May 3, 2019
@avisconti
Copy link
Contributor Author

avisconti commented May 6, 2019

@overheat confirmed #15566 is passing CI now.

@overheat
Copy link
Contributor

overheat commented May 7, 2019

Yes, confirmed.
@galak @erwango please help to review. Thanks.

@avisconti
Copy link
Contributor Author

@erwango @galak
The commit is really really simple. I'd like to get ur valuable comments on it.
Thx! :D

@galak galak merged commit 75a3ee5 into zephyrproject-rtos:master May 14, 2019
@avisconti avisconti deleted the fix-i2s-warning branch May 14, 2019 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Drivers area: Logging bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants