You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/10 15:03:21 UTC
[GitHub] [incubator-nuttx] anchao opened a new pull request, #7275: net/local: unified formatting name function
anchao opened a new pull request, #7275:
URL: https://github.com/apache/incubator-nuttx/pull/7275
## Summary
net/local: unified formatting name function
fix build warning on GCC 12.2.0
```
In file included from local/local_fifo.c:25:
In function 'local_hd_name',
inlined from 'local_open_receiver' at local/local_fifo.c:593:3:
local/local_fifo.c:128:12: warning: '%s' directive output may be truncated writing up to 107 bytes into a region of size 97 [-Wformat-truncation=]
128 | CONFIG_NET_LOCAL_VFS_PATH "/%s" LOCAL_HD_SUFFIX, inpath);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
local/local_fifo.c: In function 'local_open_receiver':
local/local_fifo.c:128:40: note: format string is defined here
128 | CONFIG_NET_LOCAL_VFS_PATH "/%s" LOCAL_HD_SUFFIX, inpath);
| ^~
In function 'local_hd_name',
inlined from 'local_open_receiver' at local/local_fifo.c:593:3:
local/local_fifo.c:127:3: note: 'snprintf' output between 15 and 122 bytes into a destination of size 109
127 | snprintf(outpath, LOCAL_FULLPATH_LEN - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128 | CONFIG_NET_LOCAL_VFS_PATH "/%s" LOCAL_HD_SUFFIX, inpath);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: chao an <an...@xiaomi.com>
## Impact
N/A
## Testing
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
$ arm-none-eabi-gcc -v
gcc version 12.2.0 (Arm GNU Toolchain 12.2.MPACBTI-Bet1 (Build arm-12-mpacbti.16))
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7275: net/local: unified formatting name function
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7275:
URL: https://github.com/apache/incubator-nuttx/pull/7275
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org