From 814fa4f632006dace09b131021b949021dfb58bf Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Sat, 3 Nov 2018 19:31:41 +0100 Subject: [PATCH] OBVIOUS Remove a useless const char *type and its initialization. Valgrind detected a leak for the line: type = xstrdup ("auto"); as the compile probably dropped the type variable completely, as its only usage was this initialization. So, remove the useless variable. --- gdb/ChangeLog | 5 +++++ gdb/language.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 95591f6485a..87db7f5fb27 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-11-03 Philippe Waroquiers + + * language.c (type): Remove. + (_initialize_language): Remove assignment to type. + 2018-11-02 Joel Brobecker * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files. diff --git a/gdb/language.c b/gdb/language.c index 21eda576b0c..e2f400161b3 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -105,10 +105,9 @@ static const struct language_defn *languages[] = { &ada_language_defn, }; -/* The current values of the "set language/type/range" enum +/* The current values of the "set language/range/case-sensitive" enum commands. */ static const char *language; -static const char *type; static const char *range; static const char *case_sensitive; @@ -1174,7 +1173,6 @@ For Fortran the default is off; for other languages the default is on."), add_set_language_command (); language = xstrdup ("auto"); - type = xstrdup ("auto"); range = xstrdup ("auto"); case_sensitive = xstrdup ("auto"); -- 2.30.2