We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strtok(NULL, ...)
When running the following code using char *strtok(char *str, const char *delim):
char *strtok(char *str, const char *delim)
int main (void) { char str[12] = "Hello World"; char *token; token = strtok(str, " "); token = strtok(NULL, " "); return(0); }
It gives an unwanted error stating:
warning: null passed to a callee that requires a non-null argument [-Wnonnull] token = strtok(NULL, " "); ~~~~ ^
The issue is that strtok should be able to run a second iteration with a NULL as it's char *str without giving me a warning.
strtok
NULL
char *str
The text was updated successfully, but these errors were encountered:
18b6f6d
jacobly0
commandblockguy
No branches or pull requests
When running the following code using
char *strtok(char *str, const char *delim)
:It gives an unwanted error stating:
The issue is that
strtok
should be able to run a second iteration with aNULL
as it'schar *str
without giving me a warning.The text was updated successfully, but these errors were encountered: