I am writing and reading registers from a memory map, like this:
//READ
return *((volatile uint32_t *) ( map + offset ));
//WRITE
*((volatile uint32_t *) ( map + offset )) = value;
However the compiler gives me warnings like this:
warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
How can I change my code to remove the warnings? I am using C++ and Linux.