xiaoxiang781216 opened a new pull request #1045:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1045


   ## Summary
   ```
   chrono_main.c: In function 'chrono_main':
   Error: chrono_main.c:396:11: error: 'strncpy' output truncated before 
terminating nul copying 7 bytes from a string of the same length 
[-Werror=stringop-truncation]
     396 |           strncpy(str, "00:00.0", 7);
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   Error: chrono_main.c:434:25: error: '%02ld' directive writing between 2 and 
9 bytes into a region of size 8 [-Werror=format-overflow=]
     434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
         |                         ^~~~~
   chrono_main.c:434:24: note: directive argument in the range [-35791394, 
35791394]
     434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
         |                        ^~~~~~~~~~~~~~~~~~~
   chrono_main.c:434:24: note: directive argument in the range [-59, 59]
   chrono_main.c:434:24: note: directive argument in the range [-21, 21]
   chrono_main.c:434:11: note: 'sprintf' output between 8 and 18 bytes into a 
destination of size 8
     434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     435 |                   (priv->ts_end.tv_nsec / 100000000));
         |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
   nsh_routecmds.c: In function 'cmd_delroute':
   Error: nsh_routecmds.c:611:11: error: 'memset' forming offset [16, 27] is 
out of the bounds [0, 16] of object 'inaddr' with type 'union <anonymous>' 
[-Werror=array-bounds]
     611 |           memset(&inaddr.ipv6, 0, sizeof(struct sockaddr_in6));
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   nsh_routecmds.c:491:5: note: 'inaddr' declared here
     491 |   } inaddr;
         |     ^~~~~~
   ```
   
   ## Impact
   Minor
   
   ## Testing
   Pass CI
   


-- 
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-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to