]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/solib.c
Add casts to memory allocation related calls
[thirdparty/binutils-gdb.git] / gdb / solib.c
index c46116d4fbcdb162c187fdfa07b3fbc2ef2cf9ee..d6ab93d3c4087e1ffe66efb001086289d4353938 100644 (file)
@@ -192,7 +192,7 @@ solib_find_1 (char *in_pathname, int *fd, int is_solib)
       char *p;
 
       /* Avoid clobbering our input.  */
-      p = alloca (strlen (in_pathname) + 1);
+      p = (char *) alloca (strlen (in_pathname) + 1);
       strcpy (p, in_pathname);
       in_pathname = p;
 
@@ -396,7 +396,7 @@ exec_file_find (char *in_pathname, int *fd)
        {
          char *new_pathname;
 
-         new_pathname = alloca (strlen (in_pathname) + 5);
+         new_pathname = (char *) alloca (strlen (in_pathname) + 5);
          strcpy (new_pathname, in_pathname);
          strcat (new_pathname, ".exe");
 
@@ -434,8 +434,9 @@ solib_find (char *in_pathname, int *fd)
        {
          char *new_pathname;
 
-         new_pathname = alloca (p - in_pathname + 1
-                                + strlen (solib_symbols_extension) + 1);
+         new_pathname
+           = (char *) alloca (p - in_pathname + 1
+                              + strlen (solib_symbols_extension) + 1);
          memcpy (new_pathname, in_pathname, p - in_pathname + 1);
          strcpy (new_pathname + (p - in_pathname) + 1,
                  solib_symbols_extension);