Skip to content

Promote warnings to exceptions in *scanf() functions #4993

New issue

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

Closed
wants to merge 1 commit into from

Conversation

kocsismate
Copy link
Member

Split off from #4937

The case when more variables than format specifiers are passed is left as a warning.

@nikic
Copy link
Member

nikic commented Dec 10, 2019

The case when more variables than format specifiers are passed is left as a warning.

Any particular reason to exclude that one? Is the idea that everything else would still get populated and the extra args just ignored?

@kocsismate
Copy link
Member Author

Yes, that's it. I just didn't want to be too aggressive than what is enough. However, I am happy to include this case as well if you see that it's worth.

@nikic
Copy link
Member

nikic commented Dec 10, 2019

Yes, that's it. I just didn't want to be too aggressive than what is enough. However, I am happy to include this case as well if you see that it's worth.

https://3v4l.org/6MW6Y => Based on the behavior here (if there are too many vars, nothing gets populated), I'd say this should definitely also throw.

@kocsismate
Copy link
Member Author

OK, it's a convincing argument for sure. The goto error; should have also told me that it's the case..

@kocsismate
Copy link
Member Author

Closing via 33f7cab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants