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 <[email protected]>
   
   ## 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to