Pourquoi je reçois; initialisation 'char *' avec une expression de type "const char *" rejets qualificatifs?

Je ne peux pas comprendre pourquoi je reçois ce message d'avertissement de clang par moi-même:

function_prototype_const_modifier.c:13:8: warning: initializing 'char *' with an
      expression of type 'const char *' discards qualifiers
      [-Wincompatible-pointer-types]
        char *ptr1 = source;
              ^      ~~~~~~
1 warning generated.

Le code est très simple

#include<stdio.h>

char *my_strcpy(char *destination, const char *source);

int main(void) {
    char str1[] = "this is something";  
    char str2[] = "123456789123456789";
    my_strcpy(str2, str1);
    puts(str2);
    return 0;
}
char *my_strcpy(char *destination, const char *source) {
    char *ptr1 = source;
    char *ptr2 = destination;
    while(*ptr1 != '
#include<stdio.h>
char *my_strcpy(char *destination, const char *source);
int main(void) {
char str1[] = "this is something";  
char str2[] = "123456789123456789";
my_strcpy(str2, str1);
puts(str2);
return 0;
}
char *my_strcpy(char *destination, const char *source) {
char *ptr1 = source;
char *ptr2 = destination;
while(*ptr1 != '\0') {
*ptr2++ = *ptr1++;
}
*ptr2 = '\0';
return destination;
}
'
) { *ptr2++ = *ptr1++; } *ptr2 = '
#include<stdio.h>
char *my_strcpy(char *destination, const char *source);
int main(void) {
char str1[] = "this is something";  
char str2[] = "123456789123456789";
my_strcpy(str2, str1);
puts(str2);
return 0;
}
char *my_strcpy(char *destination, const char *source) {
char *ptr1 = source;
char *ptr2 = destination;
while(*ptr1 != '\0') {
*ptr2++ = *ptr1++;
}
*ptr2 = '\0';
return destination;
}
'
; return destination; }

une idée?

OriginalL'auteur mko | 2012-10-22