Warning: Assignment from Incompatible Pointer Type [enabled by default] while assigning Function Address to Function Pointer

The warnings appear due to the following quote from the C Standard

6.3.2.3 Pointers

8 A pointer to a function of one type may be converted to a pointer to a function of another type and back again; the result shall compare equal to the original pointer. If a converted pointer is used to call a function whose type is not compatible with the referenced type, the behavior is undefined.

That two functions would be compatible their parameters shall have compatible types

6.7.6.3 Function declarators (including prototypes)

15 For two function types to be compatible, both shall specify compatible return types.146) Moreover, the parameter type lists, if both are present, shall agree in the number of parameters and in use of the ellipsis terminator; corresponding parameters shall have compatible types.

In your functions parameters are declared as pointers. So that they (pointers) would be compatible they shall be pointers to compatible types

6.7.6.1 Pointer declarators

2 For two pointer types to be compatible, both shall be identically qualified and both shall be pointers to compatible types.

However types int or char on the one hand and type void on the other hand are not compatible types.

You could define your functions the following way

void intSwap( void *a, void *b )
{
    int *x = a;
    int *y = b;

    *x = *x + *y;
    *y = *x - *y;
    *x = *x - *y;
}

void charSwap( void *a, void *b )
{
    char *c1 = a;
    char *c2 = b;
    char temp = *c1;

    *c1 = *c2;
    *c2 = temp;
}

You need to change

 swap=&intSwap;

to

 swap=intSwap;

Same goes for swap=&charSwap; also.

Again, your function signature(s) does not match the function pointer signature.

Your function is

void intSwap(int *a,int *b);

which is of return type void, two input parameters of int *, whereas, your function pointer signature is

void (*swap)(void*,void*);

which takes two void *s. Same for void charSwap function also.

Either yoou have to change the function signature, or you have to use a different function pointer prototype. Otherwise, the behaviour is undefined. [as mentioned in Vlad's answer].