This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 035/238] [index] python/py-evtregistry.c: -Wshadow fix


To ChangeLog:
	* python/py-evtregistry.c (evregpy_disconnect): Rename `index' to
	`idx'(-Wshadow).
---
 gdb/python/py-evtregistry.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/python/py-evtregistry.c b/gdb/python/py-evtregistry.c
index 67d5715..b5fc811 100644
--- a/gdb/python/py-evtregistry.c
+++ b/gdb/python/py-evtregistry.c
@@ -56,17 +56,17 @@ static PyObject *
 evregpy_disconnect (PyObject *self, PyObject *function)
 {
   PyObject *func;
-  int index;
+  int idx;
   PyObject *callback_list = (((eventregistry_object *) self)->callbacks);
 
   if (!PyArg_ParseTuple (function, "O", &func))
     return NULL;
 
-  index = PySequence_Index (callback_list, func);
-  if (index < 0)
+  idx = PySequence_Index (callback_list, func);
+  if (idx < 0)
     Py_RETURN_NONE;
 
-  if (PySequence_DelItem (callback_list, index) < 0)
+  if (PySequence_DelItem (callback_list, idx) < 0)
     return NULL;
 
   Py_RETURN_NONE;
-- 
1.7.5.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]