tree.c (escaped_string::escape): Replace cast to char * by const_cast<char *> (unesca...
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Mon, 18 Jun 2018 14:04:37 +0000 (14:04 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Mon, 18 Jun 2018 14:04:37 +0000 (14:04 +0000)
2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

* tree.c (escaped_string::escape): Replace cast to char * by
const_cast<char *> (unescaped).

From-SVN: r261700

gcc/ChangeLog
gcc/tree.c

index 4134a2ca7163cdd736ea04da3e15f58d2cb34da6..56401fbf9b29438d572c0e539fca9555ccac2640 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
+
+       * tree.c (escaped_string::escape): Replace cast to char * by
+       const_cast<char *> (unescaped).
+
 2018-06-18  Nick Clifton  <nickc@redhat.com>
 
        PR 84195
index 6728f1c2ce61255b3f9e1c060bd9335d9052a82e..889d88c50b4a836e03579bfaf176dbfa12eb1d5d 100644 (file)
@@ -12454,7 +12454,7 @@ escaped_string::escape (const char *unescaped)
   if (m_owned)
     free (m_str);
 
-  m_str = (char *) unescaped;
+  m_str = const_cast<char *> (unescaped);
   m_owned = false;
 
   if (unescaped == NULL || *unescaped == 0)