gdbserver/server.c: Cast return value of memmem
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 29 Oct 2015 17:41:13 +0000 (13:41 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 29 Oct 2015 17:43:02 +0000 (13:43 -0400)
gdb/gdbserver/ChangeLog:

* server.c (handle_search_memory_1): Cast return value of
memmem.

gdb/gdbserver/ChangeLog
gdb/gdbserver/server.c

index a0716426145464a622e1e2a80a3281d836204ad3..4397ff960369f06cfc151b0ea02dbdf76a15b116 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * server.c (handle_search_memory_1): Cast return value of
+       memmem.
+
 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * server.c (write_qxfer_response): Change type of data to
index b2f0f6789aac6ba371b0ddeff5f819ad38134ba1..fd2804beaa4efccb705f21b829e8c353c52fe2e4 100644 (file)
@@ -891,7 +891,8 @@ handle_search_memory_1 (CORE_ADDR start_addr, CORE_ADDR search_space_len,
                                  ? 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)
        {