This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch releases/13.1 in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 8671a87c0fcd119ef6a0baa75f6a034eefafa8a7 Author: Marco Casaroli <[email protected]> AuthorDate: Sat Aug 1 20:30:50 2026 +0200 arch/arm/rp23xx: Use the right formats in the PWM period message. setup_period() printed the uint8_t slice number with %d, and the uint32_t frequency, the uint16_t top and the uint32_t divisor with %lu. Use %u for the two small fields and PRIu32 for the two uint32_t fields. No build warns about this today, because GCC does not check syslog format strings. It shows with CONFIG_DEBUG_PWM_INFO only. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- arch/arm/src/rp23xx/rp23xx_pwm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/rp23xx/rp23xx_pwm.c b/arch/arm/src/rp23xx/rp23xx_pwm.c index 943a98958ac..d74a2ba8330 100644 --- a/arch/arm/src/rp23xx/rp23xx_pwm.c +++ b/arch/arm/src/rp23xx/rp23xx_pwm.c @@ -26,6 +26,8 @@ #include <nuttx/config.h> +#include <inttypes.h> + #include <sys/types.h> #include <stdint.h> #include <stdlib.h> @@ -527,7 +529,7 @@ void setup_period(struct rp23xx_pwm_lowerhalf_s *priv) priv->top = top; priv->divisor = div16; - pwminfo("PWM%d freq=%lu top=%lu div=%lu\n", + pwminfo("PWM%u freq=%" PRIu32 " top=%u div=%" PRIu32 "\n", priv->num, priv->frequency, priv->top,
