Skip to content
Commit 196b1d62 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Fabio Baltieri
Browse files

modem: hl7800: replace an snprintk with a strncpy



GCC format-truncation kicks in on this printk whenever the logging
configuration transforms the LOG_WRN below into a noop, and the snprintk
return argument become unused.

Fix that by switching to strncpy, fixes:

zephyrproject/zephyr/drivers/modem/hl7800.c:1786:74: warning: '%s'
directive output may be truncated writing up to 53 bytes into a region
of size 21 [-Wformat-truncation=]

reproduced with:

west build -p -b mg100 -T samples/net/telnet/sample.net.telnet

Signed-off-by: default avatarFabio Baltieri <fabiobaltieri@google.com>
parent dee8bb5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment