Comment by rbanffy

6 years ago

True, but just by looking at the code it looked right. An autoformat tool would have made the mistake more visible. I wonder if popular linters would pick it up (not only the lack of braces as a rule, but the misleading indentation)

GCC version 6 and later actually warn about misleading indentation if you use -Wall (which you should), and you can turn on -Werror to ensure you don't forget to fix the mistakes.