From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org, rnsastry@linux.vnet.ibm.com,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [patch] linux-user/syscall.c: Fix missing break for host_to_target_cmsg
Date: Wed, 7 Feb 2018 14:57:02 +0100 [thread overview]
Message-ID: <381c5681-a194-6750-06ac-7afeda9173f7@vivier.eu> (raw)
In-Reply-To: <151799695576.147.5866177190489987115@bdbb90650ae5>
Le 07/02/2018 à 10:49, no-reply@patchew.org a écrit :
> Hi,
>
> This series failed build test on s390x host. Please find the details below.
...
> CC aarch64_be-linux-user/linux-user/syscall.o
> In file included from /var/tmp/patchew-tester-tmp-ewjgn083/src/linux-user/qemu.h:16:0,
> from /var/tmp/patchew-tester-tmp-ewjgn083/src/linux-user/syscall.c:118:
> /var/tmp/patchew-tester-tmp-ewjgn083/src/linux-user/syscall.c: In function ‘do_sendrecvmsg_locked’:
> /var/tmp/patchew-tester-tmp-ewjgn083/src/linux-user/syscall_defs.h:308:61: error: ‘tgt_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> #define TARGET_CMSG_LEN(len) (sizeof(struct target_cmsghdr) + (len))
> ^
> /var/tmp/patchew-tester-tmp-ewjgn083/src/linux-user/syscall.c:1797:13: note: ‘tgt_len’ was declared here
> int tgt_len, tgt_space;
> ^~~~~~~
it seems gcc disagrees with Coverity...
I think this should fixed like:
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 74378947f0..d7fbe334eb 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1824,8 +1824,10 @@ static inline abi_long host_to_target_cmsg(struct
target_msghdr *target_msgh,
tgt_len = sizeof(struct target_timeval);
break;
default:
+ tgt_len = len;
break;
}
+ break;
default:
tgt_len = len;
break;
Peter?
Thanks,
Laurent
next prev parent reply other threads:[~2018-02-07 13:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 9:29 [Qemu-devel] [patch] linux-user/syscall.c: Fix missing break for host_to_target_cmsg Nageswara R Sastry
2018-02-07 9:49 ` no-reply
2018-02-07 13:57 ` Laurent Vivier [this message]
2018-02-08 5:33 ` Nageswara Sastry
2018-02-08 9:56 ` Nageswara R Sastry
2018-02-15 14:47 ` Laurent Vivier
2018-02-16 9:42 ` Nageswara R Sastry
2018-02-07 9:58 ` no-reply
-- strict thread matches above, loose matches on Subject: below --
2018-02-07 6:26 Nageswara R Sastry
2018-02-07 14:53 ` no-reply
2018-02-07 15:02 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=381c5681-a194-6750-06ac-7afeda9173f7@vivier.eu \
--to=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rnsastry@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).