]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/gdbserver/ax.c
Add casts to memory allocation related calls
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ax.c
index 3d0d93d152d403c87b8a49933bb767666749bb13..4c9dadc4440fdb37a201b50a09058f4b3521c749 100644 (file)
@@ -106,7 +106,7 @@ gdb_parse_agent_expr (char **actparm)
   ++act;  /* skip a comma */
   aexpr = XNEW (struct agent_expr);
   aexpr->length = xlen;
-  aexpr->bytes = xmalloc (xlen);
+  aexpr->bytes = (unsigned char *) xmalloc (xlen);
   hex2bin (act, aexpr->bytes, xlen);
   *actparm = act + (xlen * 2);
   return aexpr;
@@ -131,7 +131,7 @@ gdb_unparse_agent_expr (struct agent_expr *aexpr)
 {
   char *rslt;
 
-  rslt = xmalloc (2 * aexpr->length + 1);
+  rslt = (char *) xmalloc (2 * aexpr->length + 1);
   bin2hex (aexpr->bytes, rslt, aexpr->length);
   return rslt;
 }