[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-18 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: commit review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___ ___

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 24cf6b4d72c2 by Benjamin Peterson in branch '3.4': improve style of the convert macro (#24655) https://hg.python.org/cpython/rev/24cf6b4d72c2 New changeset bffa3b5fd2d8 by Benjamin Peterson in branch '3.5': merge 3.4 (#24655)

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-18 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-17 Thread Brian Cain
Brian Cain added the comment: Whoops, that's not right. Corrected. -- Added file: http://bugs.python.org/file39942/ssl_convert_3rd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-17 Thread Brian Cain
Brian Cain added the comment: New patch. -- Added file: http://bugs.python.org/file39941/ssl_convert_2nd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-17 Thread Brian Cain
New submission from Brian Cain: _ssl.c has a convert() macro which misuses the do { ... } while(0) pattern by accidentally omitting the do. This was discovered when building with clang, it reports while loop has empty body. Effectively, convert puts the body into gratuitous scope braces and

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-17 Thread Martin Panter
Martin Panter added the comment: The patch is certainly an improvement and could be committed. It looks like the same fault is in the 3.4 and 2.7 code. However, since the usage of this macro is limited to the four lines immediately following its definition, it might be clearer to just drop