Remove constness of libdir in do_start_initialization
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Thu, 23 Mar 2017 11:51:14 +0000 (12:51 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Thu, 23 Mar 2017 11:51:14 +0000 (12:51 +0100)
commit1a5e158b68d0fb3b1ba3d038e87c841239572a35
tree9afe3fe652aef3eba18a4214167d8a738eba24b1
parent3f2a3564b1c3872e4a380f2484d40ce2495a4835
Remove constness of libdir in do_start_initialization

The patch "Fix memory leak in python.c:do_start_initialization"
(https://sourceware.org/ml/gdb-patches/2017-03/msg00407.html) introduced a
compilation error on some platforms:

  ../../binutils-gdb/gdb/python/python.c: In function bool do_start_initialization():
  ../../binutils-gdb/gdb/python/python.c:1556:16: error: invalid conversion from const void* to void* [-fpermissive]
   xfree (libdir);
                ^

This is fixed by removing the constness of libdir's data type.

gdb/ChangeLog:

* python/python.c (do_start_initialization): Remove 'const' from
data type of libdir.
gdb/python/python.c