From: Benjamin Peterson Date: Tue, 23 Dec 2008 20:09:28 +0000 (+0000) Subject: use a global variable, so the compiler doesn't optimize the assignment out X-Git-Tag: v2.7a1~2503 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6a53b5c5242759ef9c1411a770073c25e9cc4c4;p=thirdparty%2FPython%2Fcpython.git use a global variable, so the compiler doesn't optimize the assignment out --- diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 145d5b62918b..4e81d63615d9 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -474,6 +474,8 @@ test_k_code(PyObject *self) #ifdef Py_USING_UNICODE +volatile int x; + /* Test the u and u# codes for PyArg_ParseTuple. May leak memory in case of an error. */ @@ -486,8 +488,7 @@ test_u_code(PyObject *self) /* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */ /* Just use the macro and check that it compiles */ - int x = Py_UNICODE_ISSPACE(25); - x = x; + x = Py_UNICODE_ISSPACE(25); tuple = PyTuple_New(1); if (tuple == NULL)