-
warning: deprecated conversion from string constant to 'char*'Computer/linux 2007. 11. 16. 23:02After upgrading gcc version 4.2.3 20071014 (prerelease) (Debian 4.2.2-3),
there are a lot of warning message as
warning: deprecated conversion from string constant to 'char*'
To add const before char*, the warning message was gone.void nrerror(const char *error_text);
void nrerror(const char *error_text)
/* Numerical Recipes standard error handler */
{
fprintf(stderr,"Numerical Recipes run-time error...\n");
fprintf(stderr,"%s\n", error_text);
fprintf(stderr,"...now exiting to system...\n");
exit(1);
}
warning: comparison with string literal results in unspecified behaviour
To change the way the check two string pointers,char *Wire_Type;
from if (Wire_Type == "scC")
to if (!(strcmp(Wire_Type, "scC")))'Computer > linux' 카테고리의 다른 글
xfce4-panel 죽음... (0) 2007.12.07 VirtualBox on ubuntu and win xp (0) 2007.11.15 Add user to the group for virtualbox and sound permission (0) 2007.11.14