Skip to content

Commit 1fd93ff

Browse files
authored
ceval.c: mark debug 'filename' variable as unused (GH-11074)
Use GCC __attribute__((unused)) to mark the debug variable 'filename' as unused in Python/ceval.c.
1 parent 7bbf7b0 commit 1fd93ff

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Python/ceval.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
824824
PyObject *consts;
825825
#if defined(Py_DEBUG) || defined(LLTRACE)
826826
/* Make it easier to find out where we are with a debugger */
827+
#ifdef __GNUC__
828+
char *filename __attribute__((unused));
829+
#else
827830
char *filename;
828831
#endif
832+
#endif
829833

830834
/* Tuple access macros */
831835

@@ -1288,7 +1292,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
12881292
FAST_DISPATCH();
12891293
}
12901294

1291-
1295+
12921296
TARGET_NOARG(DUP_TOP)
12931297
{
12941298
v = TOP();
@@ -1835,7 +1839,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
18351839
}
18361840

18371841

1838-
1842+
18391843
TARGET_WITH_IMPL_NOARG(SLICE, _slice)
18401844
TARGET_WITH_IMPL_NOARG(SLICE_1, _slice)
18411845
TARGET_WITH_IMPL_NOARG(SLICE_2, _slice)
@@ -1860,7 +1864,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
18601864
break;
18611865
}
18621866

1863-
1867+
18641868
TARGET_WITH_IMPL_NOARG(STORE_SLICE, _store_slice)
18651869
TARGET_WITH_IMPL_NOARG(STORE_SLICE_1, _store_slice)
18661870
TARGET_WITH_IMPL_NOARG(STORE_SLICE_2, _store_slice)

0 commit comments

Comments
 (0)