Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb Don't implicitly cast away const ...



details:   https://anonhg.NetBSD.org/src/rev/5d92a061e873
branches:  trunk
changeset: 968868:5d92a061e873
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Jan 30 20:38:12 2020 +0000

description:
Don't implicitly cast away const char * when using correct C++ string.h
implementations. Those have overloaded string operations that preserve
constness.

diffstat:

 external/gpl3/gdb/dist/gdb/solib.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r f5e2f157aed5 -r 5d92a061e873 external/gpl3/gdb/dist/gdb/solib.c
--- a/external/gpl3/gdb/dist/gdb/solib.c        Thu Jan 30 20:31:50 2020 +0000
+++ b/external/gpl3/gdb/dist/gdb/solib.c        Thu Jan 30 20:38:12 2020 +0000
@@ -509,7 +509,7 @@
   if (!b->compatible (b, bfd_get_arch_info (abfd.get ())))
     {
       char buf[SO_NAME_MAX_PATH_SIZE];
-      char *slash = strrchr(pathname, '/');
+      const char *slash = strrchr(pathname, '/');
       if (slash)
         {
           struct stat st;



Home | Main Index | Thread Index | Old Index