Skip to content

Commit a0da131

Browse files
AMDmi3methane
authored andcommitted
bpo-36527: silence -Wunused-parameter warnings in object.h (GH-12688)
1 parent 1328375 commit a0da131

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Include/object.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ static inline void _Py_NewReference(PyObject *op)
440440

441441
static inline void _Py_ForgetReference(PyObject *op)
442442
{
443+
(void)op; /* may be unused, shut up -Wunused-parameter */
443444
_Py_INC_TPFREES(op);
444445
}
445446
#endif /* !Py_TRACE_REFS */
@@ -458,6 +459,8 @@ static inline void _Py_INCREF(PyObject *op)
458459
static inline void _Py_DECREF(const char *filename, int lineno,
459460
PyObject *op)
460461
{
462+
(void)filename; /* may be unused, shut up -Wunused-parameter */
463+
(void)lineno; /* may be unused, shut up -Wunused-parameter */
461464
_Py_DEC_REFTOTAL;
462465
if (--op->ob_refcnt != 0) {
463466
#ifdef Py_REF_DEBUG

0 commit comments

Comments
 (0)