nuttx: add missing FAR and CODE

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-04-11 13:25:04 +03:00 committed by Xiang Xiao
parent 69d5f960fc
commit f15605da2f
3 changed files with 18 additions and 18 deletions

View File

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

View File

@ -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 */

View File

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