net/local: fix build error on CONFIG_DEBUG_OPTLEVEL="-O3"

Summary
The following compilation error occurs after configuring CONFIG_DEBUG_OPTLEVEL="-O3"
CC:  local/local_fifo.c In file included from local/local_fifo.c:25:
In function 'local_format_name',
    inlined from 'local_cs_name' at local/local_fifo.c:101:3,
    inlined from 'local_create_fifos' at local/local_fifo.c:431:3:
local/local_fifo.c:84:16: error: '%x' directive output may be truncated writing between 1 and 8 bytes into a region of size between 5 and 112 [-Werror=format-truncation=]
   84 |                CONFIG_NET_LOCAL_VFS_PATH "/%s%s%" PRIx32,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: wangming9 <wangming9@xiaomi.com>
This commit is contained in:
wangming9 2023-08-30 20:33:05 +08:00 committed by Petro Karashchenko
parent 6265596cd0
commit 21c30f80af
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@
#define LOCAL_SUFFIX_LEN 2 #define LOCAL_SUFFIX_LEN 2
#define LOCAL_FULLPATH_LEN (sizeof(CONFIG_NET_LOCAL_VFS_PATH) + \ #define LOCAL_FULLPATH_LEN (sizeof(CONFIG_NET_LOCAL_VFS_PATH) + \
UNIX_PATH_MAX + LOCAL_SUFFIX_LEN + 2) UNIX_PATH_MAX + LOCAL_SUFFIX_LEN + 2 + 8)
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions