Open ercanersoy opened 4 years ago
Breaks C89 compatibility.
Some of those changes might make sense but I don't really see them as necessary.
Variable scope warnings can reduce optimizations.
I don't see the point of those optimizations in the tests and doubt that the single redeclaration will matter on platforms targeted by JSMN.
Cppcheck results of jsmn.h on your repository:
jsmn.h:271:7: warning: The scope of the variable 'i' can be reduced. [variableScope]
I have used Cppcheck 1.86. I have used this command line:
cppcheck --language=c --std=c89 --enable=all --template=gcc "jsmn.h"
Reference:
Fixed variable scope warnings on jsmn.h, test/testc.c and test/testutil.h files.
These warnings have been founded by using Cppcheck 1.86.