[Python-checkins] bpo-36527: silence -Wunused-parameter warnings in object.h (GH-12688)

Inada Naoki webhook-mailer at python.org
Sat Apr 6 05:04:52 EDT 2019


https://github.com/python/cpython/commit/a0da131a74acdb147ecd64d729c86d65fecd0cff
commit: a0da131a74acdb147ecd64d729c86d65fecd0cff
branch: master
author: Dmitry Marakasov <amdmi3 at amdmi3.ru>
committer: Inada Naoki <songofacandy at gmail.com>
date: 2019-04-06T18:04:47+09:00
summary:

bpo-36527: silence -Wunused-parameter warnings in object.h (GH-12688)

files:
M Include/object.h

diff --git a/Include/object.h b/Include/object.h
index a729335750c7..86cbfc581ed1 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -440,6 +440,7 @@ static inline void _Py_NewReference(PyObject *op)
 
 static inline void _Py_ForgetReference(PyObject *op)
 {
+    (void)op; /* may be unused, shut up -Wunused-parameter */
     _Py_INC_TPFREES(op);
 }
 #endif /* !Py_TRACE_REFS */
@@ -458,6 +459,8 @@ static inline void _Py_INCREF(PyObject *op)
 static inline void _Py_DECREF(const char *filename, int lineno,
                               PyObject *op)
 {
+    (void)filename; /* may be unused, shut up -Wunused-parameter */
+    (void)lineno; /* may be unused, shut up -Wunused-parameter */
     _Py_DEC_REFTOTAL;
     if (--op->ob_refcnt != 0) {
 #ifdef Py_REF_DEBUG



More information about the Python-checkins mailing list