From decf8d9a5f91912768d52cd075b6a25617a90d1c Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 2 Jul 2015 22:39:57 +0200 Subject: Fix GCC false warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At least on gcc-4.4.7-11.el6.i686 ./configure --enable-64-bit-bfd --enable-targets=all GDB does not build due to: cc1: warnings being treated as errors s390-linux-tdep.c: In function ‘s390_handle_arg’: s390-linux-tdep.c:2575: error: ‘val’ may be used uninitialized in this function gdb/ChangeLog 2015-07-02 Jan Kratochvil Fix GCC false warning. * s390-linux-tdep.c (s390_handle_arg): Initialize VAL. --- gdb/s390-linux-tdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/s390-linux-tdep.c') diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 2460aa1d404..ec28448e119 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -2572,7 +2572,8 @@ s390_handle_arg (struct s390_arg_state *as, struct value *arg, } else if (s390_function_arg_integer (type) && length <= word_size) { - ULONGEST val; + /* Initialize it just to avoid a GCC false warning. */ + ULONGEST val = 0; if (write_mode) { -- cgit v1.2.1