xiaoxiang781216 commented on a change in pull request #1045: URL: https://github.com/apache/incubator-nuttx-apps/pull/1045#discussion_r820619028
########## File path: examples/chrono/chrono_main.c ########## @@ -393,7 +393,7 @@ int main(int argc, FAR char *argv[]) { /* Copy the initial value */ - strncpy(str, "00:00.0", 7); + strlcpy(str, "00:00.0", sizeof(str)); Review comment: Yes, here is: ``` 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); ``` -- 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