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/11/19 17:32:51 UTC

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1426: Fix clang compiler warning

xiaoxiang781216 commented on code in PR #1426:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1426#discussion_r1027120201


##########
examples/dac/dac_main.c:
##########
@@ -110,15 +110,15 @@ static void print_cmds(FAR const char *header,
                        size_t ncmds,
                        FAR const char *trailer)
 {
-  printf(header);
+  printf("%s", header);

Review Comment:
   Here:
   ```
   Error: format string is not a string literal (potentially insecure)
   ```
   In general is dangerous to printf(str) and the content of str can't be determined in compile time since str may contain % and trigger printf do some bad action.



-- 
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