diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-07-02 22:39:57 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-07-02 22:39:57 +0200 |
commit | decf8d9a5f91912768d52cd075b6a25617a90d1c (patch) | |
tree | 1019cfdf5e4958c299d55090af5fc48d3fa73923 /gdb/s390-linux-tdep.c | |
parent | 2fd0f80d57e8437d70ba79921efd3ce02e755755 (diff) | |
download | gdb-decf8d9a5f91912768d52cd075b6a25617a90d1c.zip gdb-decf8d9a5f91912768d52cd075b6a25617a90d1c.tar.gz gdb-decf8d9a5f91912768d52cd075b6a25617a90d1c.tar.bz2 |
Fix GCC false warning
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 <jan.kratochvil@redhat.com>
Fix GCC false warning.
* s390-linux-tdep.c (s390_handle_arg): Initialize VAL.
Diffstat (limited to 'gdb/s390-linux-tdep.c')
-rw-r--r-- | gdb/s390-linux-tdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 2460aa1..ec28448 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) { |