[New-bugs-announce] [issue26130] redundant local copy of a char pointer in classify in Parser\parser.c

Oren Milman report at bugs.python.org
Fri Jan 15 15:36:48 EST 2016


New submission from Oren Milman:

In Parser\parser.c in classify, the 'str' parameter is assigned into the local variable 's'. However, 'str' is not used anywhere else in the function, which makes 's' redundant.

My proposal is to simply remove 's', and just use 'str' instead.

The diff is attached.

I played a little with the interpreter, and everything worked as usual.
In addition, I run 'python -m test' (on my 64-bit Windows 10) before and after applying the patch, and got the same output:
354 tests OK.
1 test altered the execution environment:
    test_subprocess
45 tests skipped:
    test_bz2 test_crypt test_curses test_dbm_gnu test_dbm_ndbm
    test_devpoll test_epoll test_fcntl test_fork1 test_gdb test_grp
    test_idle test_ioctl test_kqueue test_lzma test_nis test_openpty
    test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd
    test_readline test_resource test_smtpnet test_socketserver
    test_spwd test_sqlite test_ssl test_syslog test_tcl
    test_threadsignals test_timeout test_tix test_tk test_ttk_guionly
    test_ttk_textonly test_urllib2net test_urllibnet test_wait3
    test_wait4 test_winsound test_xmlrpc_net test_zipfile64

----------
components: Interpreter Core
files: patchDiff.txt
messages: 258326
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: redundant local copy of a char pointer in classify in Parser\parser.c
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41629/patchDiff.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26130>
_______________________________________


More information about the New-bugs-announce mailing list