-
Notifications
You must be signed in to change notification settings - Fork 37
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
Please fix obviosuly incorrect C syntax #40
Comments
Or you might say "clang wrongfully complains" because "if(x = y)" is perfectly valid C syntax (set x to the value of y and then execute the conditional based on whether x is 0 or 1). |
This is a safeguard against a very common error when |
The |
@StefanBruens What about errors? Currently clang fails to compile Could you please make sure that clang compiles it? Thanks. |
I'm not sure what the further action here is. Compiling with -Wall creates tons of warnings, some of which are not just nitpicking. IMHO, warnings about assignments in if-statements should always be handled by either fixing it or (if intended) silenced by double parentheses. Also there are a lot of wrong printf formatting directives (wrong integer type, for instance). |
clang-8 rightfully complains:
The text was updated successfully, but these errors were encountered: