+2015-10-26 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * target.c (memory_xfer_partial): Change type of buf to gdb_byte
+ pointer.
+ (simple_search_memory): Cast return of memmem.
+
2015-10-26 Simon Marchi <simon.marchi@polymtl.ca>
* stap-probe.c (handle_stap_probe): Add (const char *) casts.
}
else
{
- void *buf;
+ gdb_byte *buf;
struct cleanup *old_chain;
/* A large write request is likely to be partially satisfied
subset of it. Cap writes to 4KB to mitigate this. */
len = min (4096, len);
- buf = xmalloc (len);
+ buf = (gdb_byte *) xmalloc (len);
old_chain = make_cleanup (xfree, buf);
memcpy (buf, writebuf, len);
gdb_byte *found_ptr;
unsigned nr_search_bytes = min (search_space_len, search_buf_size);
- found_ptr = memmem (search_buf, nr_search_bytes,
- pattern, pattern_len);
+ found_ptr = (gdb_byte *) memmem (search_buf, nr_search_bytes,
+ pattern, pattern_len);
if (found_ptr != NULL)
{