avertissement: affectation à partir incompatible pointer type [activé par défaut] lors de l'attribution de la fonction de l'adresse de pointeur de fonction

Je suis en train de mettre en œuvre une simple fonction d'échange de l'aide de la fonction de pointeur mais quand j'assigne la fonction de l'adresse d'un pointeur de fonction en suis pointersTofunctionB.c:14:6:warning: assignment from incompatible pointer type [enabled by default]. Ci-dessous mon code

#include <stdio.h>
void intSwap(int *a,int *b);
void charSwap(char *a,char *b);
void (*swap)(void*,void*);
int main(int argc, char const *argv[])
{
    int a=20,b=15;
    char c='j',d='H';
    swap=&intSwap;//warning here
    swap(&a,&b);
    printf("%d %d\n",a,b);
    swap=&charSwap;//warning here also
    swap(&c,&d);
    printf("%c %c\n",c,d ); 
    return 0;
}


void intSwap(int *a,int *b)
{
    *a=*a+*b;
    *b=*a-*b;
    *a=*a-*b;
}
void charSwap(char *a,char *b)
{
    char temp;
    temp=*a;
    *a=*b;
    *b=temp;
}

comment puis-je supprimer cet avertissement. quelqu'un m'aider sur ce point.

OriginalL'auteur sAm | 2014-12-24