]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/stack.c
Add casts to memory allocation related calls
[thirdparty/binutils-gdb.git] / gdb / stack.c
index 7d37dd179fad4ba3f57616d49099c69da2f0ec86..2b7cc92c73c830960f137aac455021fa9ab67713 100644 (file)
@@ -348,7 +348,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
        }
       CATCH (except, RETURN_MASK_ERROR)
        {
-         val_error = alloca (strlen (except.message) + 1);
+         val_error = (char *) alloca (strlen (except.message) + 1);
          strcpy (val_error, except.message);
        }
       END_CATCH
@@ -475,7 +475,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
            }
          CATCH (except, RETURN_MASK_ERROR)
            {
-             val_error = alloca (strlen (except.message) + 1);
+             val_error = (char *) alloca (strlen (except.message) + 1);
              strcpy (val_error, except.message);
            }
          END_CATCH
@@ -1915,7 +1915,7 @@ backtrace_command (char *arg, int from_tty)
        {
          if (arglen > 0)
            {
-             arg = xmalloc (arglen + 1);
+             arg = (char *) xmalloc (arglen + 1);
              make_cleanup (xfree, arg);
              arg[0] = 0;
              for (i = 0; i < argc; i++)