]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Make "msg" const in internal_vproblem
authorTom Tromey <tromey@adacore.com>
Thu, 11 Apr 2019 19:00:48 +0000 (13:00 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 11 Apr 2019 19:00:48 +0000 (13:00 -0600)
I noticed that the "msg" variable in internal_vproblem could be
"const".  This seems like an improvement because it can wind up in
rodata.

Tested by rebuilding.

gdb/ChangeLog
2019-04-11  Tom Tromey  <tromey@adacore.com>

* utils.c (internal_vproblem): Make "msg" const.

gdb/ChangeLog
gdb/utils.c

index a5cbc89972982eeadddb087101d8ea39bbc1626c..7428ed9730f3f1698ec275473088ff15f929bfe1 100644 (file)
@@ -1,3 +1,7 @@
+2019-04-11  Tom Tromey  <tromey@adacore.com>
+
+       * utils.c (internal_vproblem): Make "msg" const.
+
 2019-04-11  Alan Hayward  <alan.hayward@arm.com>
 
        * aarch64-tdep.c (aarch64_analyze_prologue_test): Reset saved regs.
index 840779a63075bee17592576dff0d47a50065d0ec..700f54f9ad32762dedff424887efdd25ac706640 100644 (file)
@@ -300,7 +300,7 @@ internal_vproblem (struct internal_problem *problem,
 
   /* Don't allow infinite error/warning recursion.  */
   {
-    static char msg[] = "Recursive internal problem.\n";
+    static const char msg[] = "Recursive internal problem.\n";
 
     switch (dejavu)
       {