* [patch] remove some unused python functions
@ 2010-01-19 23:53 Jan Kratochvil
2010-01-20 2:49 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2010-01-19 23:53 UTC (permalink / raw)
To: gdb-patches
Hi,
with --without-python:
cc1: warnings being treated as errors
varobj.c:765: error: ‘instantiate_pretty_printer’ defined but not used
varobj.c:906: error: ‘install_dynamic_child’ defined but not used
Thanks,
Jan
2010-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* varobj.c (varobj_add_child, install_dynamic_child): Wrap into #if
HAVE_PYTHON.
(instantiate_pretty_printer): Move HAVE_PYTHON outside of the function.
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -293,9 +293,13 @@ static int varobj_value_is_changeable_p (struct varobj *var);
static int is_root_p (struct varobj *var);
+#if HAVE_PYTHON
+
static struct varobj *
varobj_add_child (struct varobj *var, const char *name, struct value *value);
+#endif /* HAVE_PYTHON */
+
/* C implementation */
static int c_number_of_children (struct varobj *var);
@@ -759,12 +763,13 @@ varobj_delete (struct varobj *var, char ***dellist, int only_children)
return delcount;
}
+#if HAVE_PYTHON
+
/* Convenience function for varobj_set_visualizer. Instantiate a
pretty-printer for a given value. */
static PyObject *
instantiate_pretty_printer (PyObject *constructor, struct value *value)
{
-#if HAVE_PYTHON
PyObject *val_obj = NULL;
PyObject *printer;
@@ -775,10 +780,11 @@ instantiate_pretty_printer (PyObject *constructor, struct value *value)
printer = PyObject_CallFunctionObjArgs (constructor, val_obj, NULL);
Py_DECREF (val_obj);
return printer;
-#endif
return NULL;
}
+#endif
+
/* Set/Get variable object display format */
enum varobj_display_formats
@@ -899,6 +905,8 @@ restrict_range (VEC (varobj_p) *children, int *from, int *to)
}
}
+#if HAVE_PYTHON
+
/* A helper for update_dynamic_varobj_children that installs a new
child when needed. */
@@ -935,8 +943,6 @@ install_dynamic_child (struct varobj *var,
}
}
-#if HAVE_PYTHON
-
static int
dynamic_varobj_has_child_method (struct varobj *var)
{
@@ -1158,6 +1164,8 @@ varobj_list_children (struct varobj *var, int *from, int *to)
return var->children;
}
+#if HAVE_PYTHON
+
static struct varobj *
varobj_add_child (struct varobj *var, const char *name, struct value *value)
{
@@ -1168,6 +1176,8 @@ varobj_add_child (struct varobj *var, const char *name, struct value *value)
return v;
}
+#endif /* HAVE_PYTHON */
+
/* Obtain the type of an object Variable as a string similar to the one gdb
prints on the console */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] remove some unused python functions
2010-01-19 23:53 [patch] remove some unused python functions Jan Kratochvil
@ 2010-01-20 2:49 ` Tom Tromey
2010-01-20 6:37 ` Jan Kratochvil
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2010-01-20 2:49 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> Hi,
Jan> with --without-python:
Jan> cc1: warnings being treated as errors
Jan> varobj.c:765: error: ‘instantiate_pretty_printer’ defined but not used
Jan> varobj.c:906: error: ‘install_dynamic_child’ defined but not used
Thanks, this is OK.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] remove some unused python functions
2010-01-20 2:49 ` Tom Tromey
@ 2010-01-20 6:37 ` Jan Kratochvil
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kratochvil @ 2010-01-20 6:37 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On Wed, 20 Jan 2010 03:49:43 +0100, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> Jan> cc1: warnings being treated as errors
> Jan> varobj.c:765: error: ‘instantiate_pretty_printer’ defined but not used
> Jan> varobj.c:906: error: ‘install_dynamic_child’ defined but not used
>
> Thanks, this is OK.
Checked-in:
http://sourceware.org/ml/gdb-cvs/2010-01/msg00176.html
Thanks,
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-20 6:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 23:53 [patch] remove some unused python functions Jan Kratochvil
2010-01-20 2:49 ` Tom Tromey
2010-01-20 6:37 ` Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox