Add casts to memory allocation related calls
[deliverable/binutils-gdb.git] / gdb / c-lang.c
index f38af47490ce68d4658d3694a11163c955c76576..6731b43d21dbefd382306c7e259e701a9c8cd95e 100644 (file)
@@ -302,7 +302,7 @@ c_get_string (struct value *value, gdb_byte **buffer,
       /* I is now either a user-defined length, the number of non-null
         characters, or FETCHLIMIT.  */
       *length = i * width;
-      *buffer = xmalloc (*length);
+      *buffer = (gdb_byte *) xmalloc (*length);
       memcpy (*buffer, contents, *length);
       err = 0;
     }
@@ -412,7 +412,7 @@ emit_numeric_character (struct type *type, unsigned long value,
 {
   gdb_byte *buffer;
 
-  buffer = alloca (TYPE_LENGTH (type));
+  buffer = (gdb_byte *) alloca (TYPE_LENGTH (type));
   pack_long (buffer, type, value);
   obstack_grow (output, buffer, TYPE_LENGTH (type));
 }
This page took 0.029003 seconds and 4 git commands to generate.