This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit f15605da2f93b5571175acfac76eaa2d3c6261e5
Author: Petro Karashchenko <petro.karashche...@gmail.com>
AuthorDate: Tue Apr 11 13:25:04 2023 +0300

    nuttx: add missing FAR and CODE
    
    Signed-off-by: Petro Karashchenko <petro.karashche...@gmail.com>
---
 examples/dac/dac_main.c             |  4 ++--
 examples/webserver/webserver_main.c |  2 +-
 include/netutils/httpd.h            | 30 +++++++++++++++---------------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/examples/dac/dac_main.c b/examples/dac/dac_main.c
index d0ef1c6b1..c4f335b29 100644
--- a/examples/dac/dac_main.c
+++ b/examples/dac/dac_main.c
@@ -58,8 +58,8 @@
 struct command
 {
   FAR const char *name;
-  CODE int (* const cmd)(int argc, const char *argv[]);
-  const char *args;
+  CODE int (* const cmd)(int argc, FAR const char *argv[]);
+  FAR const char *args;
 };
 
 struct dac_state_s
diff --git a/examples/webserver/webserver_main.c 
b/examples/webserver/webserver_main.c
index 5e9a5f683..4fa508c1f 100644
--- a/examples/webserver/webserver_main.c
+++ b/examples/webserver/webserver_main.c
@@ -110,7 +110,7 @@ int main(int argc, FAR char *argv[])
   uint8_t mac[IFHWADDRLEN];
 #endif
 #ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC
-  void *handle;
+  FAR void *handle;
 #endif
 
   /* Many embedded network interfaces must have a software assigned MAC */
diff --git a/include/netutils/httpd.h b/include/netutils/httpd.h
index da8f57fbd..d0933d356 100644
--- a/include/netutils/httpd.h
+++ b/include/netutils/httpd.h
@@ -100,7 +100,7 @@
 
 struct httpd_fs_file
 {
-  char *data;
+  FAR char *data;
   int len;
 #if defined(CONFIG_NETUTILS_HTTPD_MMAP) || \
     defined(CONFIG_NETUTILS_HTTPD_SENDFILE)
@@ -113,17 +113,17 @@ struct httpd_fs_file
 
 struct httpd_state
 {
-  char     ht_buffer[HTTPD_IOBUFFER_SIZE];  /* recv() buffer */
-  char     ht_filename[HTTPD_MAX_FILENAME]; /* filename from GET command */
+  char ht_buffer[HTTPD_IOBUFFER_SIZE];  /* recv() buffer */
+  char ht_filename[HTTPD_MAX_FILENAME]; /* filename from GET command */
 #ifndef CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE
-  bool     ht_keepalive;                    /* Connection: keep-alive */
+  bool ht_keepalive;                    /* Connection: keep-alive */
 #endif
 #if defined(CONFIG_NETUTILS_HTTPD_ENABLE_CHUNKED_ENCODING)
-  bool     ht_chunked;                      /* Server uses chunked encoding 
for tx */
+  bool ht_chunked;                      /* Server uses chunked encoding for tx 
*/
 #endif
-  struct httpd_fs_file ht_file;             /* Fake file data to send */
-  int      ht_sockfd;                       /* The socket descriptor from 
accept() */
-  char    *ht_scriptptr;
+  struct httpd_fs_file ht_file;         /* Fake file data to send */
+  int ht_sockfd;                        /* The socket descriptor from accept() 
*/
+  FAR char *ht_scriptptr;
   uint16_t ht_scriptlen;
   uint16_t ht_sndlen;
 };
@@ -150,12 +150,12 @@ struct httpd_fsdata_file_noconst
 #endif
 };
 
-typedef void (*httpd_cgifunction)(struct httpd_state *, char *);
+typedef void CODE (*httpd_cgifunction)(FAR struct httpd_state *, FAR char *);
 
 struct httpd_cgi_call
 {
-  struct httpd_cgi_call *next;
-  const char *name;
+  FAR struct httpd_cgi_call *next;
+  FAR const char *name;
   httpd_cgifunction function;
 };
 
@@ -226,7 +226,7 @@ int httpd_listen(void);
  *
  ****************************************************************************/
 
-void httpd_cgi_register(struct httpd_cgi_call *cgi_call);
+void httpd_cgi_register(FAR struct httpd_cgi_call *cgi_call);
 
 /****************************************************************************
  * Name: httpd_send_datachunk
@@ -248,7 +248,7 @@ void httpd_cgi_register(struct httpd_cgi_call *cgi_call);
  *
  ****************************************************************************/
 
-int httpd_send_datachunk(int sockfd, void *data, int len, bool chunked);
+int httpd_send_datachunk(int sockfd, FAR void *data, int len, bool chunked);
 
 /****************************************************************************
  * Name: httpd_send_headers
@@ -267,10 +267,10 @@ int httpd_send_datachunk(int sockfd, void *data, int len, 
bool chunked);
  *
  ****************************************************************************/
 
-int httpd_send_headers(struct httpd_state *pstate, int status, int len);
+int httpd_send_headers(FAR struct httpd_state *pstate, int status, int len);
 
 #ifdef CONFIG_NETUTILS_HTTPDFSSTATS
-uint16_t httpd_fs_count(char *name);
+uint16_t httpd_fs_count(FAR char *name);
 #endif
 
 #ifdef CONFIG_NETUTILS_HTTPD_DIRLIST

Reply via email to