Closed schwehr closed 4 years ago
Are original approach was to aim for the highest compatibility with the code base and using C89 conventions was a conscious choice for that. This code style convention has stuck and I don't see a strong reason to change it. (besides that I personally also find code more readable with explicit variable declarations at the start of a block). If we move to C99 then we would need to change all code (to arrive again at a consistent coding style). This would be quite some effort and has the potential of introducing new bugs. So I am afraid that we have to decline this request.
I strongly disagree with your assessment. I'll still send the pull request demonstrating what I mean, so it is there for the record. You can just close it.
There are a lot of places where is would make static analysis easier if the code used C99 syntax. Doing this is typically pretty easy. While it doesn't seem like much, it makes debugging easier and makes compiler and static analyzers' output clearer.
I can do some of these as pull requests if that's okay with the project.
e.g.
Could become:
And
Could be:
And lots of places where the scope of things can be reduced. e.g.