diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-07-29 12:00:31 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-29 19:56:52 -0500 |
commit | b04636f8665a9492143529340eab4450d492d2ee (patch) | |
tree | 5d985c137e66f89bb39a7c4acf2ea5e50b30dfde /hw/bt | |
parent | f6bda9cb99345158722f2e70634dda6b4d53ea67 (diff) |
linux-user/signal.c: PPC: Silence clang uninitialized-use warning
Silence a clang warning in a PPC signal return function:
/home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/signal.c:4611:9: error: variable 'sr_addr' is used
uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/signal.c:4636:28: note: uninitialized use occurs here
unlock_user_struct(sr, sr_addr, 1);
^~~~~~~
/home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/qemu.h:442:27: note: expanded from macro 'unlock_user_struct'
unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
^
This happens when we unlock a user struct which we never
attempted to lock. Strictly, clang is actually wrong here -- it
hasn't been able to spot that unlock_user_struct() doesn't use
its second argument if the first is NULL. However it doesn't
seem too unreasonable to demand that we pass in initialized
values to it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1375095632-13735-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/bt')
0 files changed, 0 insertions, 0 deletions