diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-02-28 08:14:11 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-02-28 08:14:11 +0000 |
commit | 6425366c4bce586a821b3a707e4319fe2e1f7ac6 (patch) | |
tree | fbc701838318474987b3c1248033239029481e58 /gdb/microblaze-tdep.c | |
parent | *** empty log message *** (diff) | |
download | binutils-gdb-6425366c4bce586a821b3a707e4319fe2e1f7ac6.tar.gz binutils-gdb-6425366c4bce586a821b3a707e4319fe2e1f7ac6.tar.bz2 binutils-gdb-6425366c4bce586a821b3a707e4319fe2e1f7ac6.zip |
gdb/
Fix static analysis issue found by cppcheck.
* microblaze-tdep.c (microblaze_extract_return_value): Fix
uninitialized BUF for size 2.
Diffstat (limited to 'gdb/microblaze-tdep.c')
-rw-r--r-- | gdb/microblaze-tdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index ca6d1297bba..6aea41ed55b 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -562,6 +562,7 @@ microblaze_extract_return_value (struct type *type, struct regcache *regcache, memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 1, 1); return; case 2: /* return last 2 bytes in register. */ + regcache_cooked_read (regcache, MICROBLAZE_RETVAL_REGNUM, buf); memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 2, 2); return; case 4: /* for sizes 4 or 8, copy the required length. */ |