Revert my commit 7ba176c2f558: "Avoid useless "++" at the end of functions

Warnings found by the Clang Static Analyzer."

Most people prefer ++ at the end of functions.
This commit is contained in:
Victor Stinner 2011-05-27 16:46:51 +02:00
parent 43b068648e
commit 4f2dab5c33
3 changed files with 5 additions and 5 deletions

View file

@ -616,7 +616,7 @@ set_repr(PySetObject *so)
Py_UNICODE_COPY(u, PyUnicode_AS_UNICODE(listrepr)+1, Py_UNICODE_COPY(u, PyUnicode_AS_UNICODE(listrepr)+1,
newsize-2); newsize-2);
u += newsize-2; u += newsize-2;
*u = '}'; *u++ = '}';
Py_DECREF(listrepr); Py_DECREF(listrepr);
if (Py_TYPE(so) != &PySet_Type) { if (Py_TYPE(so) != &PySet_Type) {

View file

@ -6474,7 +6474,7 @@ PyUnicode_EncodeDecimal(Py_UNICODE *s,
} }
} }
/* 0-terminate the output string */ /* 0-terminate the output string */
*output = '\0'; *output++ = '\0';
Py_XDECREF(exc); Py_XDECREF(exc);
Py_XDECREF(errorHandler); Py_XDECREF(errorHandler);
return 0; return 0;

View file

@ -3744,11 +3744,11 @@ assemble_lnotab(struct assembler *a, struct instr *i)
a->a_lnotab_off += 2; a->a_lnotab_off += 2;
if (d_bytecode) { if (d_bytecode) {
*lnotab++ = d_bytecode; *lnotab++ = d_bytecode;
*lnotab = d_lineno; *lnotab++ = d_lineno;
} }
else { /* First line of a block; def stmt, etc. */ else { /* First line of a block; def stmt, etc. */
*lnotab++ = 0; *lnotab++ = 0;
*lnotab = d_lineno; *lnotab++ = d_lineno;
} }
a->a_lineno = i->i_lineno; a->a_lineno = i->i_lineno;
a->a_lineno_off = a->a_offset; a->a_lineno_off = a->a_offset;
@ -3793,7 +3793,7 @@ assemble_emit(struct assembler *a, struct instr *i)
if (i->i_hasarg) { if (i->i_hasarg) {
assert(size == 3 || size == 6); assert(size == 3 || size == 6);
*code++ = arg & 0xff; *code++ = arg & 0xff;
*code = arg >> 8; *code++ = arg >> 8;
} }
return 1; return 1;
} }