Start to remove unnecessary 'signed char *' casts from strings that are now just plain char * types.

This commit is contained in:
Richard Barry 2013-12-27 14:43:48 +00:00
parent b4116a7c7d
commit da93f1fc4b
261 changed files with 2822 additions and 2815 deletions

View file

@ -123,7 +123,7 @@ portTickType StartTime, EndTime, Elapsed;
{
msg = &dummyptr;
}
if( timeout != 0 )
{
if(pdTRUE == xQueueReceive( mbox, &(*msg), timeout ) )
@ -154,7 +154,7 @@ portTickType StartTime, EndTime, Elapsed;
{
Elapsed = 1;
}
return ( Elapsed ); // return time blocked TBD test
return ( Elapsed ); // return time blocked TBD test
}
}
@ -217,7 +217,7 @@ portTickType StartTime, EndTime, Elapsed;
{
Elapsed = 1;
}
return (Elapsed); // return time blocked TBD test
return (Elapsed); // return time blocked TBD test
}
else
{
@ -237,8 +237,8 @@ portTickType StartTime, EndTime, Elapsed;
Elapsed = 1;
}
return ( Elapsed ); // return time blocked
return ( Elapsed ); // return time blocked
}
}
@ -275,7 +275,7 @@ sys_init(void)
// keep track of how many threads have been created
nextthread = 0;
s_sys_arch_state.nTaskCount = 0;
sys_set_default_state();
}
@ -329,7 +329,7 @@ sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio)
xTaskHandle CreatedTask;
int result;
result = xTaskCreate(thread, ( signed char * ) s_sys_arch_state.cTaskName, s_sys_arch_state.nStackDepth, arg, prio, &CreatedTask );
result = xTaskCreate(thread, s_sys_arch_state.cTaskName, s_sys_arch_state.nStackDepth, arg, prio, &CreatedTask );
// For each task created, store the task handle (pid) in the timers array.
// This scheme doesn't allow for threads to be deleted
@ -338,7 +338,7 @@ int result;
if(result == pdPASS)
{
++s_sys_arch_state.nTaskCount;
return CreatedTask;
}
else

View file

@ -116,23 +116,23 @@ static void low_level_init(struct netif *netif)
ENET_InitClocksGPIO();
ENET_Init();
ENET_Start();
portENTER_CRITICAL();
{
/*set MAC physical*/
ENET_MAC->MAH = (MAC_ADDR5<<8) + MAC_ADDR4;
ENET_MAC->MAL = (MAC_ADDR3<<24) + (MAC_ADDR2<<16) + (MAC_ADDR1<<8) + MAC_ADDR0;
VIC_Config( ENET_ITLine, VIC_IRQ, 1 );
VIC_ITCmd( ENET_ITLine, ENABLE );
VIC_ITCmd( ENET_ITLine, ENABLE );
ENET_DMA->ISR = DMI_RX_CURRENT_DONE;
ENET_DMA->IER = DMI_RX_CURRENT_DONE;
}
portEXIT_CRITICAL();
/* Create the task that handles the EMAC. */
xTaskCreate( ethernetif_input, ( signed char * ) "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL );
}
xTaskCreate( ethernetif_input, "ETH_INT", netifINTERFACE_TASK_STACK_SIZE, NULL, netifINTERFACE_TASK_PRIORITY, NULL );
}
/*
@ -303,17 +303,17 @@ static void ethernetif_input( void * pvParameters )
do
{
ethernetif = s_pxNetIf->state;
/* move received packet into a new pbuf */
p = low_level_input( s_pxNetIf );
if( p == NULL )
{
/* No packet could be read. Wait a for an interrupt to tell us
there is more data available. */
vEMACWaitForInput();
}
} while( p == NULL );
/* points to packet payload, which starts with an Ethernet header */
@ -336,12 +336,12 @@ static void ethernetif_input( void * pvParameters )
/* pass to network layer */
s_pxNetIf->input(p, s_pxNetIf);
break;
case ETHTYPE_ARP:
/* pass p to ARP module */
etharp_arp_input(s_pxNetIf, ethernetif->ethaddr, p);
break;
default:
pbuf_free(p);
p = NULL;
@ -394,7 +394,7 @@ ethernetif_init(struct netif *netif)
netif->ifoutnucastpkts = 0;
netif->ifoutdiscards = 0;
#endif
netif->state = ethernetif;
netif->name[0] = IFNAME0;
netif->name[1] = IFNAME1;
@ -419,11 +419,11 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Give the semaphore in case the lwIP task needs waking. */
xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken );
/* Clear the interrupt. */
ENET_DMA->ISR = DMI_RX_CURRENT_DONE;
/* Switch tasks if necessary. */
/* Switch tasks if necessary. */
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
}
/*-----------------------------------------------------------*/

View file

@ -97,7 +97,7 @@ PT_THREAD(file_stats(struct httpd_state *s, char *ptr))
PSOCK_BEGIN(&s->sout);
PSOCK_GENERATOR_SEND(&s->sout, generate_file_stats, strchr(ptr, ' ') + 1);
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
@ -138,14 +138,14 @@ static const char *states[] = {
closing,
time_wait,
last_ack};
static unsigned short
generate_tcp_stats(void *arg)
{
struct uip_conn *conn;
struct httpd_state *s = (struct httpd_state *)arg;
conn = &uip_conns[s->count];
return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE,
"<tr><td>%d</td><td>%u.%u.%u.%u:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",
@ -165,7 +165,7 @@ generate_tcp_stats(void *arg)
static
PT_THREAD(tcp_stats(struct httpd_state *s, char *ptr))
{
PSOCK_BEGIN(&s->sout);
for(s->count = 0; s->count < UIP_CONNS; ++s->count) {
@ -196,14 +196,14 @@ PT_THREAD(net_stats(struct httpd_state *s, char *ptr))
++s->count) {
PSOCK_GENERATOR_SEND(&s->sout, generate_net_stats, s);
}
#endif /* UIP_STATISTICS */
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
extern void vTaskList( signed char *pcWriteBuffer );
extern void vTaskList( char *pcWriteBuffer );
static char cCountBuf[ 32 ];
long lRefreshCount = 0;
static unsigned short
@ -211,9 +211,9 @@ generate_rtos_stats(void *arg)
{
lRefreshCount++;
sprintf( cCountBuf, "<p><br>Refresh count = %d", lRefreshCount );
vTaskList( uip_appdata );
vTaskList( ( char * ) uip_appdata );
strcat( uip_appdata, cCountBuf );
return strlen( uip_appdata );
}
/*---------------------------------------------------------------------------*/
@ -225,7 +225,7 @@ PT_THREAD(rtos_stats(struct httpd_state *s, char *ptr))
PSOCK_BEGIN(&s->sout);
// for( s->count = 0; s->count < 4; ++s->count )
// {
PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL);
PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL);
// }
PSOCK_END(&s->sout);
}