I'm getting warning like this on xc32 compiler (gcc based microcontroller compiler, not open-source).
modem_uart.c:66:5: warning: passing argument 1 of 'memset' discards 'volatile' qualifier from pointer target type [enabled by default]
Here is the code:
#include <string.h>
// (...)
volatile char rxbuf[MODEM_UART_RXBUF_SIZE];
// (...)
void some_function(void)
{
// (...)
memset(rxbuf, 0, MODEM_UART_RXBUF_SIZE); // <- warning here
// (...)
}
Can someone explain why compiler is discarding volatile?