Skip to contentSkip to conversation

slirp gcc9 build fix

GIT PULL Applied Samuel Thibault 3 participants 4 messages Apr 15, 2019 – Apr 16, 2019

lore
Share & tools
lore
#0 lore raw

The following changes since commit afccfc0c4c6134a7bc9da6375996b3b91d291de4:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-04-12 17:06:49 +0100)

are available in the Git repository at:

https://people.debian.org/~sthibault/qemu.git tags/samuel-thibault

for you to fetch changes up to 6fabae61a9393fd2bc703837e464b9c34ec5ef25:

slirp: Gcc 9 -O3 fix (2019-04-15 20:01:18 +0200)

----------------------------------------------------------------
Slirp updates

Dr. David Alan Gilbert (1):
slirp: Gcc 9 -O3 fix

----------------------------------------------------------------
Dr. David Alan Gilbert (1):
slirp: Gcc 9 -O3 fix

 slirp/src/socket.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
#1 lore raw

[Qemu-devel] [PULL 1/1] slirp: Gcc 9 -O3 fix

From: "Dr. David Alan Gilbert" <[email protected]>

Gcc 9 needs some convincing that sopreprbuf really is going to fill in iov in the call from soreadbuf, even though the failure case shouldn't happen.

Message-Id: <[email protected]>

---
 slirp/src/socket.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
slirp/src/socket.c +4 -1
index 4a3c935e25..bb752fdcae 100644
@@ -171,6 +171,7 @@ int
 soread(struct socket *so)
 {
 	int n, nn;
+	size_t buf_len;
 	struct sbuf *sb = &so->so_snd;
 	struct iovec iov[2];
 
@@ -181,7 +182,8 @@ soread(struct socket *so)
 	 * No need to check if there's enough room to read.
 	 * soread wouldn't have been called if there weren't
 	 */
-	sopreprbuf(so, iov, &n);
+	buf_len = sopreprbuf(so, iov, &n);
+	assert(buf_len != 0);
 
 	nn = recv(so->s, iov[0].iov_base, iov[0].iov_len,0);
 	if (nn <= 0) {
@@ -257,6 +259,7 @@ int soreadbuf(struct socket *so, const char *buf, int size)
 	 * No need to check if there's enough room to read.
 	 * soread wouldn't have been called if there weren't
 	 */
+	assert(size > 0);
 	if (sopreprbuf(so, iov, &n) < size)
         goto err;
 
Signature · 1 line
2.20.1
#2 lore raw
In reply to Samuel Thibault
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Message-id: [email protected]
Subject: [Qemu-devel] [PULL 0/1] slirp gcc9 build fix
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/[email protected] -> patchew/[email protected]
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
7e45fd0bf6 slirp: Gcc 9 -O3 fix

=== OUTPUT BEGIN ===
ERROR: code indent should never use tabs
#24: FILE: slirp/src/socket.c:174:
+^Isize_t buf_len;$

ERROR: code indent should never use tabs
#33: FILE: slirp/src/socket.c:185:
+^Ibuf_len = sopreprbuf(so, iov, &n);$

ERROR: code indent should never use tabs
#34: FILE: slirp/src/socket.c:186:
+^Iassert(buf_len != 0);$

ERROR: code indent should never use tabs
#42: FILE: slirp/src/socket.c:262:
+^Iassert(size > 0);$

total: 4 errors, 0 warnings, 23 lines checked

Commit 7e45fd0bf690 (slirp: Gcc 9 -O3 fix) has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#3 lore raw
In reply to Samuel Thibault
Quoted 19 lines · Samuel Thibault

The following changes since commit afccfc0c4c6134a7bc9da6375996b3b91d291de4:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-04-12 17:06:49 +0100)

are available in the Git repository at:

https://people.debian.org/~sthibault/qemu.git tags/samuel-thibault

for you to fetch changes up to 6fabae61a9393fd2bc703837e464b9c34ec5ef25:

slirp: Gcc 9 -O3 fix (2019-04-15 20:01:18 +0200)

----------------------------------------------------------------
Slirp updates

Dr. David Alan Gilbert (1):
slirp: Gcc 9 -O3 fix

Quoted 6 lines

----------------------------------------------------------------
Dr. David Alan Gilbert (1):
slirp: Gcc 9 -O3 fix

 slirp/src/socket.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM