From 1547ef64562ebbfcdc768ce93979f09bdd119b11 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 25 Feb 2016 09:30:22 -0800 Subject: [PATCH] avoid compiler warnings in remote-m32r-sdi.c gdb/ChangeLog: * remote-m32r-sdi.c (recv_char_data): Initialize val to avoid compiler warning. (recv_long_data): Ditto. --- gdb/ChangeLog | 6 ++++++ gdb/remote-m32r-sdi.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 00af3950277..fe3aa3627f2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-02-25 Doug Evans + + * remote-m32r-sdi.c (recv_char_data): Initialize val to avoid + compiler warning. + (recv_long_data): Ditto. + 2016-02-25 Simon Marchi * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index c1bd858737d..2d3a1ad2bcb 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); -- 2.30.2