[Python-Dev] static analysis of python source (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Fri Apr 20 15:54:43 CEST 2007
- Previous message: [Python-Dev] Win64, 64 Bit Version and 32 Bit version parallel install not possible
- Next message: [Python-Dev] static analysis of python source
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I just ran some static analysis of the python core 2.5 with Visual Studio team system. There was the stray error discovered. I will update the most obvious ones.
Some questions, though:
This code in binascii.c, line 1168 (and again 1238) is wrong: while (in < datalen) { if ((data[in] > 126) || (data[in] == '=') || (header && data[in] == '_') || ((data[in] == '.') && (linelen == 1)) || (!istext && ((data[in] == '\r') || (data[in] == '\n'))) || ((data[in] == '\t' || data[in] == ' ') && (in + 1 == datalen)) || ((data[in] < 33) && (data[in] != '\r') && (data[in] != '\n') && (quotetabs && ((data[in] != '\t') || (data[in] != ' '))))) The final ((data[in] != '\t') || (data[in] != ' ')) is always true. What is the right form? ((data[in] == '\t') || (data[in] == ' ')) ?
There is a lot of code that goes like this:
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20070420/6f3d8751/attachment.htm
- Previous message: [Python-Dev] Win64, 64 Bit Version and 32 Bit version parallel install not possible
- Next message: [Python-Dev] static analysis of python source
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]