Add some more casts (2/2)
[deliverable/binutils-gdb.git] / gdb / target-memory.c
index d9bacb3de70fd627375ed579da3bc0906b04560f..9067033e1f4ca108d35766c7fb1818871b116733 100644 (file)
@@ -1,8 +1,7 @@
 /* Parts of target interface that deal with accessing memory and memory-like
    objects.
 
-   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2006-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "target.h"
 #include "memory-map.h"
 
-#include "gdb_assert.h"
-
-#include <stdio.h>
-#include <sys/time.h>
+#include "gdb_sys_time.h"
 
 static int
 compare_block_starting_address (const void *a, const void *b)
 {
-  const struct memory_write_request *a_req = a;
-  const struct memory_write_request *b_req = b;
+  const struct memory_write_request *a_req
+    = (const struct memory_write_request *) a;
+  const struct memory_write_request *b_req
+    = (const struct memory_write_request *) b;
 
   if (a_req->begin < b_req->begin)
     return -1;
@@ -292,7 +290,7 @@ compute_garbled_blocks (VEC(memory_write_request_s) *erased_blocks,
 static void
 cleanup_request_data (void *p)
 {
-  VEC(memory_write_request_s) **v = p;
+  VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
   struct memory_write_request *r;
   int i;
 
@@ -303,7 +301,7 @@ cleanup_request_data (void *p)
 static void
 cleanup_write_requests_vector (void *p)
 {
-  VEC(memory_write_request_s) **v = p;
+  VEC(memory_write_request_s) **v = (VEC(memory_write_request_s) **) p;
 
   VEC_free (memory_write_request_s, *v);
 }
@@ -370,7 +368,7 @@ target_write_memory_blocks (VEC(memory_write_request_s) *requests,
          for (i = 0; VEC_iterate (memory_write_request_s, garbled, i, r); ++i)
            {
              gdb_assert (r->data == NULL);
-             r->data = xmalloc (r->end - r->begin);
+             r->data = (gdb_byte *) xmalloc (r->end - r->begin);
              err = target_read_memory (r->begin, r->data, r->end - r->begin);
              if (err != 0)
                goto out;
This page took 0.025458 seconds and 4 git commands to generate.