Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8ffe7bbb
Commit
8ffe7bbb
authored
May 03, 2010
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused variables and a variable initialization.
Found using Clang's static analyzer.
parent
5d947cb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Modules/_sre.c
Modules/_sre.c
+6
-6
No files found.
Modules/_sre.c
View file @
8ffe7bbb
...
...
@@ -1686,7 +1686,7 @@ getstring(PyObject* string, Py_ssize_t* p_length, int* p_charsize)
if
(
PyUnicode_Check
(
string
))
{
/* unicode strings doesn't always support the buffer interface */
ptr
=
(
void
*
)
PyUnicode_AS_DATA
(
string
);
bytes
=
PyUnicode_GET_DATA_SIZE
(
string
);
/* bytes = PyUnicode_GET_DATA_SIZE(string); */
size
=
PyUnicode_GET_SIZE
(
string
);
charsize
=
sizeof
(
Py_UNICODE
);
...
...
@@ -2967,13 +2967,13 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
<INFO> <1=skip> <2=flags> <3=min> <4=max>;
If SRE_INFO_PREFIX or SRE_INFO_CHARSET is in the flags,
more follows. */
SRE_CODE
flags
,
min
,
max
,
i
;
SRE_CODE
flags
,
i
;
SRE_CODE
*
newcode
;
GET_SKIP
;
newcode
=
code
+
skip
-
1
;
GET_ARG
;
flags
=
arg
;
GET_ARG
;
min
=
arg
;
GET_ARG
;
max
=
arg
;
GET_ARG
;
/* min */
GET_ARG
;
/* max */
/* Check that only valid flags are present */
if
((
flags
&
~
(
SRE_INFO_PREFIX
|
SRE_INFO_LITERAL
|
...
...
@@ -2989,9 +2989,9 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
FAIL
;
/* Validate the prefix */
if
(
flags
&
SRE_INFO_PREFIX
)
{
SRE_CODE
prefix_len
,
prefix_skip
;
SRE_CODE
prefix_len
;
GET_ARG
;
prefix_len
=
arg
;
GET_ARG
;
prefix_skip
=
arg
;
GET_ARG
;
/* prefix skip */
/* Here comes the prefix string */
if
(
code
+
prefix_len
<
code
||
code
+
prefix_len
>
newcode
)
FAIL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment