To fix this you have to change from old code: if ((p = strchr(str, '/')) == NULL)
to new code: if ((p = (char*)strchr(str, '/')) == NULL)