Name: Anonymous 2009-11-01 2:55
Ok, I've got this code (not exactly as seen here, it's much long and obviously uses real variable names etc. but I just provided the bare minimum so you can see what's going on):
I get this message:
[Warning] passing arg 1 of `strtok' discards qualifiers from pointer target type
What the hell does that mean? I'm not too worried about it because it works fine if I just typecast sarg with (char*), but I'd like to know wtf this actually means instead of just assuming that everything will be ok as long as I typecast, since that could potentially lead to some unsafe behaviour that I can't foresee.
void myfunc(const char *sarg)
{
char *temp;
temp = strtok(sarg, ".");
/* etc. doesn't matter what I have beyond this code */
}I get this message:
[Warning] passing arg 1 of `strtok' discards qualifiers from pointer target type
What the hell does that mean? I'm not too worried about it because it works fine if I just typecast sarg with (char*), but I'd like to know wtf this actually means instead of just assuming that everything will be ok as long as I typecast, since that could potentially lead to some unsafe behaviour that I can't foresee.