#include void swap(void *v[], int i, int j) { void *tmp; tmp = v[i]; v[i] = v[j]; v[j] = tmp; } int main(void) { char *s[] = {
To avoid the warning call the function as follows,
swap((void *) s, 0, 1);
It is always safe to cast any pointer as a void pointer.