Fix compiler warnings over const losses.
This commit is contained in:
parent
d0373af5c0
commit
2d9c701c37
13 changed files with 22 additions and 22 deletions
|
@ -184,7 +184,7 @@ uint32_t IRAM run_test(const char *string, test_with_fn_t testfn, const char *te
|
|||
return instructions;
|
||||
}
|
||||
|
||||
void test_string(const char *string, char *label, bool evict_cache)
|
||||
void test_string(const char *string, const char *label, bool evict_cache)
|
||||
{
|
||||
printf("Testing %s (%p) '%s'\r\n", label, string, string);
|
||||
printf("Formats as: '");
|
||||
|
|
|
@ -43,7 +43,7 @@ int32_t ssi_handler(int32_t iIndex, char *pcInsert, int32_t iInsertLen)
|
|||
return (strlen(pcInsert));
|
||||
}
|
||||
|
||||
char *gpio_cgi_handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
|
||||
const char *gpio_cgi_handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
|
||||
{
|
||||
for (int i = 0; i < iNumParams; i++) {
|
||||
if (strcmp(pcParam[i], "on") == 0) {
|
||||
|
@ -63,12 +63,12 @@ char *gpio_cgi_handler(int iIndex, int iNumParams, char *pcParam[], char *pcValu
|
|||
return "/index.ssi";
|
||||
}
|
||||
|
||||
char *about_cgi_handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
|
||||
const char *about_cgi_handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
|
||||
{
|
||||
return "/about.html";
|
||||
}
|
||||
|
||||
char *websocket_cgi_handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
|
||||
const char *websocket_cgi_handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
|
||||
{
|
||||
return "/websockets.html";
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
void sntp_tsk(void *pvParameters)
|
||||
{
|
||||
char *servers[] = {SNTP_SERVERS};
|
||||
const char *servers[] = {SNTP_SERVERS};
|
||||
UNUSED_ARG(pvParameters);
|
||||
|
||||
/* Wait until we have joined AP and are assigned an IP */
|
||||
|
|
|
@ -19,7 +19,7 @@ void httpd_task(void *pvParameters)
|
|||
if ((err = netconn_recv(client, &nb)) == ERR_OK) {
|
||||
struct sdk_station_config config;
|
||||
sdk_wifi_station_get_config(&config);
|
||||
char * buf =
|
||||
const char * buf =
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\
|
||||
<root>\
|
||||
<device>\
|
||||
|
@ -50,4 +50,4 @@ void httpd_task(void *pvParameters)
|
|||
netconn_close(client);
|
||||
netconn_delete(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ static const char* get_my_ip(void)
|
|||
* @param recv the lwip UDP callback
|
||||
* @retval udp_pcb* or NULL if joining failed
|
||||
*/
|
||||
static struct udp_pcb* mcast_join_group(char *group_ip, uint16_t group_port, void (* recv)(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port))
|
||||
static struct udp_pcb* mcast_join_group(const char *group_ip, uint16_t group_port, void (* recv)(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port))
|
||||
{
|
||||
bool status = false;
|
||||
struct udp_pcb *upcb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue