mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
FreeTCPIP - remove compiler warnings.
This commit is contained in:
parent
f43bd20a6d
commit
5f95494dff
|
@ -96,6 +96,8 @@ static PT_THREAD( send_file ( struct httpd_state *s ) )
|
||||||
{
|
{
|
||||||
PSOCK_BEGIN( &s->sout );
|
PSOCK_BEGIN( &s->sout );
|
||||||
|
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
PSOCK_GENERATOR_SEND( &s->sout, generate_part_of_file, s );
|
PSOCK_GENERATOR_SEND( &s->sout, generate_part_of_file, s );
|
||||||
|
@ -110,7 +112,8 @@ static PT_THREAD( send_file ( struct httpd_state *s ) )
|
||||||
static PT_THREAD( send_part_of_file ( struct httpd_state *s ) )
|
static PT_THREAD( send_part_of_file ( struct httpd_state *s ) )
|
||||||
{
|
{
|
||||||
PSOCK_BEGIN( &s->sout );
|
PSOCK_BEGIN( &s->sout );
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
|
|
||||||
PSOCK_SEND( &s->sout, s->file.data, s->len );
|
PSOCK_SEND( &s->sout, s->file.data, s->len );
|
||||||
|
|
||||||
PSOCK_END( &s->sout );
|
PSOCK_END( &s->sout );
|
||||||
|
@ -131,7 +134,7 @@ static PT_THREAD( handle_script ( struct httpd_state *s ) )
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
PT_BEGIN( &s->scriptpt );
|
PT_BEGIN( &s->scriptpt );
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
while( s->file.len > 0 )
|
while( s->file.len > 0 )
|
||||||
{
|
{
|
||||||
/* Check if we should start executing a script. */
|
/* Check if we should start executing a script. */
|
||||||
|
@ -202,7 +205,7 @@ static PT_THREAD( send_headers ( struct httpd_state *s, const char *statushdr )
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
PSOCK_BEGIN( &s->sout );
|
PSOCK_BEGIN( &s->sout );
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
PSOCK_SEND_STR( &s->sout, statushdr );
|
PSOCK_SEND_STR( &s->sout, statushdr );
|
||||||
|
|
||||||
ptr = strrchr( s->filename, ISO_period );
|
ptr = strrchr( s->filename, ISO_period );
|
||||||
|
@ -244,7 +247,7 @@ static PT_THREAD( handle_output ( struct httpd_state *s ) )
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
PT_BEGIN( &s->outputpt );
|
PT_BEGIN( &s->outputpt );
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
if( !httpd_fs_open(s->filename, &s->file) )
|
if( !httpd_fs_open(s->filename, &s->file) )
|
||||||
{
|
{
|
||||||
httpd_fs_open( http_404_html, &s->file );
|
httpd_fs_open( http_404_html, &s->file );
|
||||||
|
@ -275,7 +278,7 @@ static PT_THREAD( handle_output ( struct httpd_state *s ) )
|
||||||
static PT_THREAD( handle_input ( struct httpd_state *s ) )
|
static PT_THREAD( handle_input ( struct httpd_state *s ) )
|
||||||
{
|
{
|
||||||
PSOCK_BEGIN( &s->sin );
|
PSOCK_BEGIN( &s->sin );
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
PSOCK_READTO( &s->sin, ISO_space );
|
PSOCK_READTO( &s->sin, ISO_space );
|
||||||
|
|
||||||
if( strncmp(s->inputbuf, http_get, 4) != 0 )
|
if( strncmp(s->inputbuf, http_get, 4) != 0 )
|
||||||
|
|
|
@ -17,3 +17,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __ICCRX__
|
||||||
|
;
|
||||||
|
#pragma pack()
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,3 +19,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __ICCRX__
|
||||||
|
#pragma pack(1)
|
||||||
|
#endif
|
||||||
|
|
|
@ -160,7 +160,7 @@ struct uip_eth_addr
|
||||||
|
|
||||||
uip_ipaddr(&addr, 192,168,1,2);
|
uip_ipaddr(&addr, 192,168,1,2);
|
||||||
uip_sethostaddr(&addr);
|
uip_sethostaddr(&addr);
|
||||||
|
|
||||||
\endcode
|
\endcode
|
||||||
* \param addr A pointer to an IP address of type uip_ipaddr_t;
|
* \param addr A pointer to an IP address of type uip_ipaddr_t;
|
||||||
*
|
*
|
||||||
|
@ -842,7 +842,7 @@ CCIF void uip_send( const void *data, int len );
|
||||||
\code
|
\code
|
||||||
uip_ipaddr_t addr;
|
uip_ipaddr_t addr;
|
||||||
struct uip_udp_conn *c;
|
struct uip_udp_conn *c;
|
||||||
|
|
||||||
uip_ipaddr(&addr, 192,168,2,1);
|
uip_ipaddr(&addr, 192,168,2,1);
|
||||||
c = uip_udp_new(&addr, HTONS(12345));
|
c = uip_udp_new(&addr, HTONS(12345));
|
||||||
if(c != NULL) {
|
if(c != NULL) {
|
||||||
|
@ -929,7 +929,7 @@ CCIF void uip_send( const void *data, int len );
|
||||||
\code
|
\code
|
||||||
uip_ipaddr_t ipaddr;
|
uip_ipaddr_t ipaddr;
|
||||||
struct uip_conn *c;
|
struct uip_conn *c;
|
||||||
|
|
||||||
uip_ipaddr(&ipaddr, 192,168,1,2);
|
uip_ipaddr(&ipaddr, 192,168,1,2);
|
||||||
c = uip_connect(&ipaddr, HTONS(80));
|
c = uip_connect(&ipaddr, HTONS(80));
|
||||||
\endcode
|
\endcode
|
||||||
|
@ -1017,7 +1017,7 @@ CCIF void uip_send( const void *data, int len );
|
||||||
* \hideinitializer
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
#ifndef uip_ipaddr_copy
|
#ifndef uip_ipaddr_copy
|
||||||
#define uip_ipaddr_copy( dest, src ) ( *(dest) = *(src) )
|
#define uip_ipaddr_copy( dest, src ) ( ((unsigned long*)dest)[ 0 ] = ((unsigned long *)src)[ 0 ] )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1443,7 +1443,7 @@ struct uip_stats
|
||||||
layer. */
|
layer. */
|
||||||
uip_stats_t sent; /**< Number of sent packets at the IP
|
uip_stats_t sent; /**< Number of sent packets at the IP
|
||||||
layer. */
|
layer. */
|
||||||
uip_stats_t forwarded; /**< Number of forwarded packets at the IP
|
uip_stats_t forwarded; /**< Number of forwarded packets at the IP
|
||||||
layer. */
|
layer. */
|
||||||
uip_stats_t drop; /**< Number of dropped packets at the IP
|
uip_stats_t drop; /**< Number of dropped packets at the IP
|
||||||
layer. */
|
layer. */
|
||||||
|
@ -1635,7 +1635,6 @@ struct uip_tcpip_hdr
|
||||||
u8_t urgp[2];
|
u8_t urgp[2];
|
||||||
u8_t optdata[4];
|
u8_t optdata[4];
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "net/pack_struct_end.h"
|
#include "net/pack_struct_end.h"
|
||||||
|
|
||||||
/* The ICMP and IP headers. */
|
/* The ICMP and IP headers. */
|
||||||
|
|
|
@ -119,7 +119,7 @@ buf_bufto(register struct psock_buf *buf, u8_t endmarker,
|
||||||
++buf->ptr;
|
++buf->ptr;
|
||||||
--*datalen;
|
--*datalen;
|
||||||
--buf->left;
|
--buf->left;
|
||||||
|
|
||||||
if(c == endmarker) {
|
if(c == endmarker) {
|
||||||
return BUF_FOUND;
|
return BUF_FOUND;
|
||||||
}
|
}
|
||||||
|
@ -133,12 +133,12 @@ buf_bufto(register struct psock_buf *buf, u8_t endmarker,
|
||||||
c = **dataptr;
|
c = **dataptr;
|
||||||
--*datalen;
|
--*datalen;
|
||||||
++*dataptr;
|
++*dataptr;
|
||||||
|
|
||||||
if(c == endmarker) {
|
if(c == endmarker) {
|
||||||
return BUF_FOUND | BUF_FULL;
|
return BUF_FOUND | BUF_FULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return BUF_FULL;
|
return BUF_FULL;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -178,7 +178,7 @@ PT_THREAD(psock_send(register struct psock *s, const char *buf,
|
||||||
unsigned int len))
|
unsigned int len))
|
||||||
{
|
{
|
||||||
PT_BEGIN(&s->psockpt);
|
PT_BEGIN(&s->psockpt);
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
/* If there is no data to send, we exit immediately. */
|
/* If there is no data to send, we exit immediately. */
|
||||||
if(len == 0) {
|
if(len == 0) {
|
||||||
PT_EXIT(&s->psockpt);
|
PT_EXIT(&s->psockpt);
|
||||||
|
@ -209,7 +209,7 @@ PT_THREAD(psock_send(register struct psock *s, const char *buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
s->state = STATE_NONE;
|
s->state = STATE_NONE;
|
||||||
|
|
||||||
PT_END(&s->psockpt);
|
PT_END(&s->psockpt);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -217,7 +217,7 @@ PT_THREAD(psock_generator_send(register struct psock *s,
|
||||||
unsigned short (*generate)(void *), void *arg))
|
unsigned short (*generate)(void *), void *arg))
|
||||||
{
|
{
|
||||||
PT_BEGIN(&s->psockpt);
|
PT_BEGIN(&s->psockpt);
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
/* Ensure that there is a generator function to call. */
|
/* Ensure that there is a generator function to call. */
|
||||||
if(generate == NULL) {
|
if(generate == NULL) {
|
||||||
PT_EXIT(&s->psockpt);
|
PT_EXIT(&s->psockpt);
|
||||||
|
@ -228,7 +228,7 @@ PT_THREAD(psock_generator_send(register struct psock *s,
|
||||||
s->sendlen = generate(arg);
|
s->sendlen = generate(arg);
|
||||||
s->sendptr = uip_appdata;
|
s->sendptr = uip_appdata;
|
||||||
|
|
||||||
s->state = STATE_NONE;
|
s->state = STATE_NONE;
|
||||||
do {
|
do {
|
||||||
/* Call the generator function again if we are called to perform a
|
/* Call the generator function again if we are called to perform a
|
||||||
retransmission. */
|
retransmission. */
|
||||||
|
@ -238,9 +238,9 @@ PT_THREAD(psock_generator_send(register struct psock *s,
|
||||||
/* Wait until all data is sent and acknowledged. */
|
/* Wait until all data is sent and acknowledged. */
|
||||||
PT_WAIT_UNTIL(&s->psockpt, data_acked(s) & send_data(s));
|
PT_WAIT_UNTIL(&s->psockpt, data_acked(s) & send_data(s));
|
||||||
} while(s->sendlen > 0);
|
} while(s->sendlen > 0);
|
||||||
|
|
||||||
s->state = STATE_NONE;
|
s->state = STATE_NONE;
|
||||||
|
|
||||||
PT_END(&s->psockpt);
|
PT_END(&s->psockpt);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -273,9 +273,9 @@ psock_newdata(struct psock *s)
|
||||||
PT_THREAD(psock_readto(register struct psock *psock, unsigned char c))
|
PT_THREAD(psock_readto(register struct psock *psock, unsigned char c))
|
||||||
{
|
{
|
||||||
PT_BEGIN(&psock->psockpt);
|
PT_BEGIN(&psock->psockpt);
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
buf_setup(&psock->buf, (unsigned char*)psock->bufptr, psock->bufsize);
|
buf_setup(&psock->buf, (unsigned char*)psock->bufptr, psock->bufsize);
|
||||||
|
|
||||||
/* XXX: Should add buf_checkmarker() before do{} loop, if
|
/* XXX: Should add buf_checkmarker() before do{} loop, if
|
||||||
incoming data has been handled while waiting for a write. */
|
incoming data has been handled while waiting for a write. */
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ PT_THREAD(psock_readto(register struct psock *psock, unsigned char c))
|
||||||
} while((buf_bufto(&psock->buf, c,
|
} while((buf_bufto(&psock->buf, c,
|
||||||
&psock->readptr,
|
&psock->readptr,
|
||||||
&psock->readlen) & BUF_FOUND) == 0);
|
&psock->readlen) & BUF_FOUND) == 0);
|
||||||
|
|
||||||
if(psock_datalen(psock) == 0) {
|
if(psock_datalen(psock) == 0) {
|
||||||
psock->state = STATE_NONE;
|
psock->state = STATE_NONE;
|
||||||
PT_RESTART(&psock->psockpt);
|
PT_RESTART(&psock->psockpt);
|
||||||
|
@ -300,9 +300,9 @@ PT_THREAD(psock_readto(register struct psock *psock, unsigned char c))
|
||||||
PT_THREAD(psock_readbuf(register struct psock *psock))
|
PT_THREAD(psock_readbuf(register struct psock *psock))
|
||||||
{
|
{
|
||||||
PT_BEGIN(&psock->psockpt);
|
PT_BEGIN(&psock->psockpt);
|
||||||
|
( void ) PT_YIELD_FLAG;
|
||||||
buf_setup(&psock->buf, (unsigned char * ) psock->bufptr, psock->bufsize);
|
buf_setup(&psock->buf, (unsigned char * ) psock->bufptr, psock->bufsize);
|
||||||
|
|
||||||
/* XXX: Should add buf_checkmarker() before do{} loop, if
|
/* XXX: Should add buf_checkmarker() before do{} loop, if
|
||||||
incoming data has been handled while waiting for a write. */
|
incoming data has been handled while waiting for a write. */
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,6 @@ struct arp_entry
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct uip_eth_addr broadcast_ethaddr = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
|
static const struct uip_eth_addr broadcast_ethaddr = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
|
||||||
static const u16_t broadcast_ipaddr[2] = { 0xffff, 0xffff };
|
|
||||||
|
|
||||||
static struct arp_entry arp_table[UIP_ARPTAB_SIZE];
|
static struct arp_entry arp_table[UIP_ARPTAB_SIZE];
|
||||||
static uip_ipaddr_t ipaddr;
|
static uip_ipaddr_t ipaddr;
|
||||||
|
|
Loading…
Reference in a new issue