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/03/06 12:23:35 UTC

[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a change in pull request #1044: Fix warning found without -fno-builtin

pkarashchenko commented on a change in pull request #1044:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1044#discussion_r820225822



##########
File path: system/nxplayer/nxplayer.c
##########
@@ -148,7 +148,7 @@ static int _open_with_http(const char *fullurl)
   char resp_msg[] = "\r\n\r\n";
   struct timeval tv;
   uint16_t port = 80;
-  char buf[64];
+  char buf[256];

Review comment:
       why this is 256? Ia it somehow depending on `CONFIG_NXPLAYER_HTTP_MAXFILENAME`?

##########
File path: graphics/nxwidgets/src/cprogressbar.cxx
##########
@@ -181,7 +181,7 @@ void CProgressBar::drawContents(CGraphicsPort *port)
 
   if (m_showPercentageText)
     {
-      char text[6];
+      char text[8];

Review comment:
       Why this is 8 and not 12? I mean that 11 for maximum chars for `int` + 1 for `%`. Just for me to understand. Maybe we can use `%hd%%` or `%hhd%%`?

##########
File path: netutils/webserver/httpd_dirlist.c
##########
@@ -193,10 +193,10 @@ ssize_t httpd_dirlist(int outfd, FAR struct httpd_fs_file *file)
           break;
         }
 
-      path = malloc(CONFIG_NAME_MAX);
+      path = malloc(PATH_MAX);
       ASSERT(path);
 
-      snprintf(path, CONFIG_NAME_MAX, "%s/%s",
+      snprintf(path, PATH_MAX, "%s/%s",
                file->path, dent->d_name);

Review comment:
       ```suggestion
         snprintf(path, PATH_MAX, "%s/%s", file->path, dent->d_name);
   ```




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