Fix some cppcheck reports

About "#if PY_VERSION_HEX <= 0x02050000" part, I didn't change anything.
I had to use "fromdos" then "todos" to manage end of line issue (EOL is different in Unix, MacOS and Windows env).