This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[OB PATCH] avoid compiler warnings in remote-m32r-sdi.c
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 25 Feb 2016 17:32:39 +0000
- Subject: [OB PATCH] avoid compiler warnings in remote-m32r-sdi.c
- Authentication-results: sourceware.org; auth=none
Hi.
fyi, I committed this patch.
2016-02-25 Doug Evans <dje@google.com>
* remote-m32r-sdi.c (recv_char_data): Initialize val to avoid
compiler warning.
(recv_long_data): Ditto.
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index c1bd858..2d3a1ad 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -270,7 +270,7 @@ send_three_arg_cmd (unsigned char cmd, unsigned long
arg1, unsigned long arg2,
static unsigned char
recv_char_data (void)
{
- unsigned char val;
+ unsigned char val = 0; /* -Wall */
recv_data (&val, 1);
return val;
@@ -279,7 +279,7 @@ recv_char_data (void)
static unsigned long
recv_long_data (void)
{
- unsigned long val;
+ unsigned long val = 0; /* -Wall */
recv_data (&val, 4);
return ntohl (val);