cl333r
January 16th, 2009, 04:20 AM
Hi,
does anyone know why I get the warning "main.c:29: warning: initialization makes pointer from integer without a cast" for line
char *home = getenv("HOME");
and writing "char *home = (char *)getenv("HOME");" cancels the warning. The API states that a (char *) is being returned from getenv, why do I have to explicitly cast it?
does anyone know why I get the warning "main.c:29: warning: initialization makes pointer from integer without a cast" for line
char *home = getenv("HOME");
and writing "char *home = (char *)getenv("HOME");" cancels the warning. The API states that a (char *) is being returned from getenv, why do I have to explicitly cast it?