]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
ceval.c: mark debug 'filename' variable as unused (GH-11074)
authorVictor Stinner <vstinner@redhat.com>
Mon, 10 Dec 2018 12:53:38 +0000 (13:53 +0100)
committerGitHub <noreply@github.com>
Mon, 10 Dec 2018 12:53:38 +0000 (13:53 +0100)
Use GCC __attribute__((unused)) to mark the debug variable 'filename'
as unused in Python/ceval.c.

Python/ceval.c

index 2088a271d86e1bf33216f3f8b4fcfa98fbdbc28d..b561cd0f3039d7a11165f05868a73d936d5735b1 100644 (file)
@@ -824,8 +824,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
     PyObject *consts;
 #if defined(Py_DEBUG) || defined(LLTRACE)
     /* Make it easier to find out where we are with a debugger */
+#ifdef __GNUC__
+    char *filename __attribute__((unused));
+#else
     char *filename;
 #endif
+#endif
 
 /* Tuple access macros */
 
@@ -1288,7 +1292,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             FAST_DISPATCH();
         }
 
-       
+
         TARGET_NOARG(DUP_TOP)
         {
             v = TOP();
@@ -1835,7 +1839,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
         }
 
 
-     
+
         TARGET_WITH_IMPL_NOARG(SLICE, _slice)
         TARGET_WITH_IMPL_NOARG(SLICE_1, _slice)
         TARGET_WITH_IMPL_NOARG(SLICE_2, _slice)
@@ -1860,7 +1864,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             break;
         }
 
-     
+
         TARGET_WITH_IMPL_NOARG(STORE_SLICE, _store_slice)
         TARGET_WITH_IMPL_NOARG(STORE_SLICE_1, _store_slice)
         TARGET_WITH_IMPL_NOARG(STORE_SLICE_2, _store_slice)