[Qemu-devel] [PULLv2 00/32] More work towards libslirp

Samuel Thibault posted 32 patches 5 years, 1 month ago
Test docker-mingw@fedora passed
Test asan passed
Test checkpatch failed
Test docker-clang@ubuntu failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190205165927.26599-1-samuel.thibault@ens-lyon.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Jason Wang <jasowang@redhat.com>, Jan Kiszka <jan.kiszka@siemens.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>
Makefile.objs            |   1 -
include/glib-compat.h    |  57 ---
include/net/net.h        |   2 +-
include/qemu/main-loop.h |  15 +
net/net.c                |   4 +-
net/slirp.c              | 185 ++++++++-
slirp/Makefile.objs      |   4 +-
slirp/arp_table.c        |   3 +-
slirp/bootp.c            |   1 -
slirp/cksum.c            |   1 -
slirp/debug.h            |  13 +-
slirp/dhcpv6.c           |   4 +-
slirp/dnssearch.c        |   1 -
slirp/if.c               |   4 +-
slirp/ip.h               |  17 +-
slirp/ip6.h              |  14 +-
slirp/ip6_icmp.c         |  27 +-
slirp/ip6_icmp.h         |  26 +-
slirp/ip6_input.c        |   1 -
slirp/ip6_output.c       |   2 -
slirp/ip_icmp.c          |  14 +-
slirp/ip_icmp.h          |  18 +-
slirp/ip_input.c         |   5 +-
slirp/ip_output.c        |   1 -
slirp/libslirp.h         |  71 +++-
slirp/main.h             |   2 +-
slirp/mbuf.c             |   1 -
slirp/mbuf.h             |   2 +-
slirp/misc.c             | 126 ++++--
slirp/misc.h             |  15 +-
slirp/ncsi.c             |   3 +-
slirp/ndp_table.c        |   2 -
slirp/qtailq.h           | 193 ++++++++++
slirp/sbuf.c             |   8 +-
slirp/sbuf.h             |   2 +-
slirp/slirp.c            | 980 +++++++++++++++--------------------------------
slirp/slirp.h            |  45 +--
slirp/socket.c           |  33 +-
slirp/socket.h           |   9 +-
slirp/state.c            | 394 +++++++++++++++++++
slirp/state.h            |   9 +
slirp/tcp_input.c        |  29 +-
slirp/tcp_output.c       |  13 +-
slirp/tcp_subr.c         |  49 +--
slirp/tcp_timer.c        |   3 +-
slirp/tcp_var.h          |  14 +-
slirp/tftp.c             |  16 +-
slirp/trace-events       |   5 -
slirp/udp.c              |  16 +-
slirp/udp.h              |   2 +-
slirp/udp6.c             |   2 -
slirp/util.c             | 207 ++++++++++
slirp/util.h             | 127 ++++++
stubs/Makefile.objs      |   3 +-
stubs/slirp.c            |  13 -
util/main-loop.c         |  30 +-
util/osdep.c             |   2 +-
57 files changed, 1827 insertions(+), 1019 deletions(-)
create mode 100644 slirp/qtailq.h
create mode 100644 slirp/state.c
create mode 100644 slirp/state.h
delete mode 100644 slirp/trace-events
create mode 100644 slirp/util.c
create mode 100644 slirp/util.h
delete mode 100644 stubs/slirp.c
[Qemu-devel] [PULLv2 00/32] More work towards libslirp
Posted by Samuel Thibault 5 years, 1 month ago
The following changes since commit 01a9a51ffaf4699827ea6425cb2b834a356e159d:

  Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190205-pull-request' into staging (2019-02-05 14:01:29 +0000)

are available in the Git repository at:

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

for you to fetch changes up to cf20be34d44a953c9b52a4d5cf6f4232968e6f3c:

  slirp: API is extern C (2019-02-05 18:56:17 +0200)

----------------------------------------------------------------
More work towards libslirp

Marc-André Lureau (27):
  slirp: generalize guestfwd with a callback based approach
  net/slirp: simplify checking for cmd: prefix
  net/slirp: free forwarding rules on cleanup
  net/slirp: fix leaks on forwarding rule registration error
  slirp: add callbacks for timer
  slirp: replace trace functions with DEBUG calls
  slirp: replace QEMU_PACKED with SLIRP_PACKED
  slirp: replace most qemu socket utilities with slirp own version
  slirp: replace qemu_set_nonblock()
  slirp: add unregister_poll_fd() callback
  slirp: replace qemu_notify_event() with a callback
  slirp: move QEMU state saving to a separate unit
  slirp: do not include qemu headers in libslirp.h public API header
  slirp: improve windows headers inclusion
  slirp: add slirp own version of pstrcpy
  slirp: remove qemu timer.h dependency
  slirp: remove now useless QEMU headers inclusions
  slirp: replace net/eth.h inclusion with own defines
  slirp: replace qemu qtailq with slirp own copy
  slirp: replace remaining qemu headers dependency
  slirp: prefer c99 types over BSD kind
  slirp: improve send_packet() callback
  slirp: replace global polling with per-instance & notifier
  slirp: remove slirp_instances list
  slirp: use polling callbacks, drop glib requirement
  slirp: pass opaque to all callbacks
  slirp: API is extern C

Peter Maydell (2):
  slirp: Avoid marking naturally packed structs as QEMU_PACKED
  slirp: Don't mark struct ipq or struct ipasfrag as packed

Samuel Thibault (3):
  slirp: Avoid unaligned 16bit memory access
  slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT
  slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/

----------------------------------------------------------------
Marc-André Lureau (27):
      slirp: generalize guestfwd with a callback based approach
      net/slirp: simplify checking for cmd: prefix
      net/slirp: free forwarding rules on cleanup
      net/slirp: fix leaks on forwarding rule registration error
      slirp: add callbacks for timer
      slirp: replace trace functions with DEBUG calls
      slirp: replace QEMU_PACKED with SLIRP_PACKED
      slirp: replace most qemu socket utilities with slirp own version
      slirp: replace qemu_set_nonblock()
      slirp: add unregister_poll_fd() callback
      slirp: replace qemu_notify_event() with a callback
      slirp: move QEMU state saving to a separate unit
      slirp: do not include qemu headers in libslirp.h public API header
      slirp: improve windows headers inclusion
      slirp: add slirp own version of pstrcpy
      slirp: remove qemu timer.h dependency
      slirp: remove now useless QEMU headers inclusions
      slirp: replace net/eth.h inclusion with own defines
      slirp: replace qemu qtailq with slirp own copy
      slirp: replace remaining qemu headers dependency
      slirp: prefer c99 types over BSD kind
      slirp: improve send_packet() callback
      slirp: replace global polling with per-instance & notifier
      slirp: remove slirp_instances list
      slirp: use polling callbacks, drop glib requirement
      slirp: pass opaque to all callbacks
      slirp: API is extern C

Peter Maydell (2):
      slirp: Avoid marking naturally packed structs as QEMU_PACKED
      slirp: Don't mark struct ipq or struct ipasfrag as packed

Samuel Thibault (3):
      slirp: Avoid unaligned 16bit memory access
      slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT
      slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/

 Makefile.objs            |   1 -
 include/glib-compat.h    |  57 ---
 include/net/net.h        |   2 +-
 include/qemu/main-loop.h |  15 +
 net/net.c                |   4 +-
 net/slirp.c              | 185 ++++++++-
 slirp/Makefile.objs      |   4 +-
 slirp/arp_table.c        |   3 +-
 slirp/bootp.c            |   1 -
 slirp/cksum.c            |   1 -
 slirp/debug.h            |  13 +-
 slirp/dhcpv6.c           |   4 +-
 slirp/dnssearch.c        |   1 -
 slirp/if.c               |   4 +-
 slirp/ip.h               |  17 +-
 slirp/ip6.h              |  14 +-
 slirp/ip6_icmp.c         |  27 +-
 slirp/ip6_icmp.h         |  26 +-
 slirp/ip6_input.c        |   1 -
 slirp/ip6_output.c       |   2 -
 slirp/ip_icmp.c          |  14 +-
 slirp/ip_icmp.h          |  18 +-
 slirp/ip_input.c         |   5 +-
 slirp/ip_output.c        |   1 -
 slirp/libslirp.h         |  71 +++-
 slirp/main.h             |   2 +-
 slirp/mbuf.c             |   1 -
 slirp/mbuf.h             |   2 +-
 slirp/misc.c             | 126 ++++--
 slirp/misc.h             |  15 +-
 slirp/ncsi.c             |   3 +-
 slirp/ndp_table.c        |   2 -
 slirp/qtailq.h           | 193 ++++++++++
 slirp/sbuf.c             |   8 +-
 slirp/sbuf.h             |   2 +-
 slirp/slirp.c            | 980 +++++++++++++++--------------------------------
 slirp/slirp.h            |  45 +--
 slirp/socket.c           |  33 +-
 slirp/socket.h           |   9 +-
 slirp/state.c            | 394 +++++++++++++++++++
 slirp/state.h            |   9 +
 slirp/tcp_input.c        |  29 +-
 slirp/tcp_output.c       |  13 +-
 slirp/tcp_subr.c         |  49 +--
 slirp/tcp_timer.c        |   3 +-
 slirp/tcp_var.h          |  14 +-
 slirp/tftp.c             |  16 +-
 slirp/trace-events       |   5 -
 slirp/udp.c              |  16 +-
 slirp/udp.h              |   2 +-
 slirp/udp6.c             |   2 -
 slirp/util.c             | 207 ++++++++++
 slirp/util.h             | 127 ++++++
 stubs/Makefile.objs      |   3 +-
 stubs/slirp.c            |  13 -
 util/main-loop.c         |  30 +-
 util/osdep.c             |   2 +-
 57 files changed, 1827 insertions(+), 1019 deletions(-)
 create mode 100644 slirp/qtailq.h
 create mode 100644 slirp/state.c
 create mode 100644 slirp/state.h
 delete mode 100644 slirp/trace-events
 create mode 100644 slirp/util.c
 create mode 100644 slirp/util.h
 delete mode 100644 stubs/slirp.c

Re: [Qemu-devel] [PULLv2 00/32] More work towards libslirp
Posted by no-reply@patchew.org 5 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/20190205165927.26599-1-samuel.thibault@ens-lyon.org/



Hi,

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

Subject: [Qemu-devel] [PULLv2 00/32] More work towards libslirp
Type: series
Message-id: 20190205165927.26599-1-samuel.thibault@ens-lyon.org

=== TEST SCRIPT BEGIN ===
#!/bin/bash
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
   01a9a51ffa..68df0c30ed  master     -> master
 t [tag update]            patchew/20190205151810.571-1-peter.maydell@linaro.org -> patchew/20190205151810.571-1-peter.maydell@linaro.org
 * [new tag]               patchew/20190205165927.26599-1-samuel.thibault@ens-lyon.org -> patchew/20190205165927.26599-1-samuel.thibault@ens-lyon.org
Switched to a new branch 'test'
cdc1e8f63e slirp: API is extern C
4dd78b51f2 slirp: pass opaque to all callbacks
e2e03ac7c5 slirp: use polling callbacks, drop glib requirement
865ad7fef9 slirp: remove slirp_instances list
181ccaa3f9 slirp: replace global polling with per-instance & notifier
3ca10a4b2d slirp: improve send_packet() callback
ba50ea2e00 slirp: prefer c99 types over BSD kind
46f51c952b slirp: replace remaining qemu headers dependency
4900a932e9 slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/
6c2bb4ac5a slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT
d918af2891 slirp: replace qemu qtailq with slirp own copy
775dbf5782 slirp: replace net/eth.h inclusion with own defines
9b02515930 slirp: remove now useless QEMU headers inclusions
5f8ab44f97 slirp: remove qemu timer.h dependency
04e129b0a0 slirp: add slirp own version of pstrcpy
86e8eebc85 slirp: improve windows headers inclusion
a1259feabf slirp: do not include qemu headers in libslirp.h public API header
9b30e0cc0b slirp: move QEMU state saving to a separate unit
e1beca1eae slirp: replace qemu_notify_event() with a callback
356398ae46 slirp: add unregister_poll_fd() callback
8bd42a95d1 slirp: replace qemu_set_nonblock()
1d7846a244 slirp: replace most qemu socket utilities with slirp own version
98db6a950f slirp: replace QEMU_PACKED with SLIRP_PACKED
e2ab8ac7b1 slirp: replace trace functions with DEBUG calls
4ddeb43ccf slirp: add callbacks for timer
07c6b9500c net/slirp: fix leaks on forwarding rule registration error
32a714e3c1 net/slirp: free forwarding rules on cleanup
c2ca5d7419 net/slirp: simplify checking for cmd: prefix
9fd21c2685 slirp: generalize guestfwd with a callback based approach
c4303625d0 slirp: Don't mark struct ipq or struct ipasfrag as packed
b934d1d20e slirp: Avoid marking naturally packed structs as QEMU_PACKED
ecc3a21eff slirp: Avoid unaligned 16bit memory access

=== OUTPUT BEGIN ===
1/32 Checking commit ecc3a21effe1 (slirp: Avoid unaligned 16bit memory access)
2/32 Checking commit b934d1d20e7b (slirp: Avoid marking naturally packed structs as QEMU_PACKED)
3/32 Checking commit c4303625d07e (slirp: Don't mark struct ipq or struct ipasfrag as packed)
4/32 Checking commit 9fd21c2685b4 (slirp: generalize guestfwd with a callback based approach)
ERROR: code indent should never use tabs
#148: FILE: slirp/misc.h:14:
+^ISlirpWriteCb write_cb;$

ERROR: code indent should never use tabs
#149: FILE: slirp/misc.h:15:
+^Ivoid *opaque;$

total: 2 errors, 0 warnings, 226 lines checked

Patch 4/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/32 Checking commit c2ca5d741993 (net/slirp: simplify checking for cmd: prefix)
6/32 Checking commit 32a714e3c121 (net/slirp: free forwarding rules on cleanup)
7/32 Checking commit 07c6b9500cc1 (net/slirp: fix leaks on forwarding rule registration error)
8/32 Checking commit 4ddeb43ccff0 (slirp: add callbacks for timer)
9/32 Checking commit e2ab8ac7b1de (slirp: replace trace functions with DEBUG calls)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#100: 
deleted file mode 100644

total: 0 errors, 1 warnings, 62 lines checked

Patch 9/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/32 Checking commit 98db6a950f0e (slirp: replace QEMU_PACKED with SLIRP_PACKED)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#111: 
new file mode 100644

total: 0 errors, 1 warnings, 111 lines checked

Patch 10/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/32 Checking commit 1d7846a244a7 (slirp: replace most qemu socket utilities with slirp own version)
ERROR: code indent should never use tabs
#130: FILE: slirp/socket.c:190:
+^Inn = slirp_recv(so->s, iov[0].iov_base, iov[0].iov_len,0);$

ERROR: space required after that ',' (ctx:VxV)
#130: FILE: slirp/socket.c:190:
+       nn = slirp_recv(so->s, iov[0].iov_base, iov[0].iov_len,0);
                                                              ^

WARNING: line over 80 characters
#139: FILE: slirp/socket.c:206:
+                                       slirp_getsockopt(so->s, SOL_SOCKET, SO_ERROR,

ERROR: code indent should never use tabs
#139: FILE: slirp/socket.c:206:
+^I^I^I^I^Islirp_getsockopt(so->s, SOL_SOCKET, SO_ERROR,$

ERROR: space required after that ',' (ctx:VxV)
#148: FILE: slirp/socket.c:236:
+            ret = slirp_recv(so->s, iov[1].iov_base, iov[1].iov_len,0);
                                                                    ^

ERROR: code indent should never use tabs
#157: FILE: slirp/socket.c:557:
+^I  slirp_ioctlsocket(so->s, FIONREAD, &n);$

ERROR: code indent should never use tabs
#167: FILE: slirp/socket.c:722:
+^Iif (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||$

ERROR: space required after that ',' (ctx:VxV)
#167: FILE: slirp/socket.c:722:
+       if (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||
                                      ^

ERROR: space required after that ',' (ctx:VxV)
#167: FILE: slirp/socket.c:722:
+       if (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||
                                                  ^

ERROR: do not use assignment in if condition
#167: FILE: slirp/socket.c:722:
+       if (((s = slirp_socket(AF_INET,SOCK_STREAM,0)) < 0) ||

ERROR: code indent should never use tabs
#168: FILE: slirp/socket.c:723:
+^I    (slirp_socket_set_fast_reuse(s) < 0) ||$

ERROR: code indent should never use tabs
#184: FILE: slirp/socket.c:740:
+^Islirp_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(int));$

ERROR: code indent should never use tabs
#187: FILE: slirp/socket.c:742:
+^Islirp_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(int));$

ERROR: code indent should never use tabs
#200: FILE: slirp/tcp_subr.c:340:
+^Islirp_closesocket(so->s);$

ERROR: code indent should never use tabs
#267: FILE: slirp/udp.c:295:
+^Islirp_closesocket(so->s);$

ERROR: code indent should never use tabs
#276: FILE: slirp/udp.c:330:
+^Iso->s = slirp_socket(AF_INET,SOCK_DGRAM,0);$

ERROR: space required after that ',' (ctx:VxV)
#276: FILE: slirp/udp.c:330:
+       so->s = slirp_socket(AF_INET,SOCK_DGRAM,0);
                                    ^

ERROR: space required after that ',' (ctx:VxV)
#276: FILE: slirp/udp.c:330:
+       so->s = slirp_socket(AF_INET,SOCK_DGRAM,0);
                                               ^

ERROR: code indent should never use tabs
#285: FILE: slirp/udp.c:346:
+^Islirp_socket_set_fast_reuse(so->s);$

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#290: 
new file mode 100644

ERROR: return of an errno should typically be -ve (return -EINTR)
#379: FILE: slirp/util.c:85:
+        return EINTR;

ERROR: return of an errno should typically be -ve (return -EINVAL)
#381: FILE: slirp/util.c:87:
+        return EINVAL;

ERROR: return of an errno should typically be -ve (return -EBADF)
#383: FILE: slirp/util.c:89:
+        return EBADF;

ERROR: return of an errno should typically be -ve (return -ENOMEM)
#385: FILE: slirp/util.c:91:
+        return ENOMEM;

ERROR: return of an errno should typically be -ve (return -EINVAL)
#387: FILE: slirp/util.c:93:
+        return EINVAL;

ERROR: return of an errno should typically be -ve (return -ENAMETOOLONG)
#389: FILE: slirp/util.c:95:
+        return ENAMETOOLONG;

ERROR: return of an errno should typically be -ve (return -ENOTEMPTY)
#391: FILE: slirp/util.c:97:
+        return ENOTEMPTY;

WARNING: Block comments use a leading /* on a separate line
#393: FILE: slirp/util.c:99:
+         /* not using EWOULDBLOCK as we don't want code to have

WARNING: Block comments use a trailing */ on a separate line
#394: FILE: slirp/util.c:100:
+          * to check both EWOULDBLOCK and EAGAIN */

ERROR: return of an errno should typically be -ve (return -EAGAIN)
#395: FILE: slirp/util.c:101:
+        return EAGAIN;

ERROR: return of an errno should typically be -ve (return -EINPROGRESS)
#397: FILE: slirp/util.c:103:
+        return EINPROGRESS;

ERROR: return of an errno should typically be -ve (return -EALREADY)
#399: FILE: slirp/util.c:105:
+        return EALREADY;

ERROR: return of an errno should typically be -ve (return -ENOTSOCK)
#401: FILE: slirp/util.c:107:
+        return ENOTSOCK;

ERROR: return of an errno should typically be -ve (return -EDESTADDRREQ)
#403: FILE: slirp/util.c:109:
+        return EDESTADDRREQ;

ERROR: return of an errno should typically be -ve (return -EMSGSIZE)
#405: FILE: slirp/util.c:111:
+        return EMSGSIZE;

ERROR: return of an errno should typically be -ve (return -EPROTOTYPE)
#407: FILE: slirp/util.c:113:
+        return EPROTOTYPE;

ERROR: return of an errno should typically be -ve (return -ENOPROTOOPT)
#409: FILE: slirp/util.c:115:
+        return ENOPROTOOPT;

ERROR: return of an errno should typically be -ve (return -EPROTONOSUPPORT)
#411: FILE: slirp/util.c:117:
+        return EPROTONOSUPPORT;

ERROR: return of an errno should typically be -ve (return -EOPNOTSUPP)
#413: FILE: slirp/util.c:119:
+        return EOPNOTSUPP;

ERROR: return of an errno should typically be -ve (return -EAFNOSUPPORT)
#415: FILE: slirp/util.c:121:
+        return EAFNOSUPPORT;

ERROR: return of an errno should typically be -ve (return -EADDRINUSE)
#417: FILE: slirp/util.c:123:
+        return EADDRINUSE;

ERROR: return of an errno should typically be -ve (return -EADDRNOTAVAIL)
#419: FILE: slirp/util.c:125:
+        return EADDRNOTAVAIL;

ERROR: return of an errno should typically be -ve (return -ENETDOWN)
#421: FILE: slirp/util.c:127:
+        return ENETDOWN;

ERROR: return of an errno should typically be -ve (return -ENETUNREACH)
#423: FILE: slirp/util.c:129:
+        return ENETUNREACH;

ERROR: return of an errno should typically be -ve (return -ENETRESET)
#425: FILE: slirp/util.c:131:
+        return ENETRESET;

ERROR: return of an errno should typically be -ve (return -ECONNABORTED)
#427: FILE: slirp/util.c:133:
+        return ECONNABORTED;

ERROR: return of an errno should typically be -ve (return -ECONNRESET)
#429: FILE: slirp/util.c:135:
+        return ECONNRESET;

ERROR: return of an errno should typically be -ve (return -ENOBUFS)
#431: FILE: slirp/util.c:137:
+        return ENOBUFS;

ERROR: return of an errno should typically be -ve (return -EISCONN)
#433: FILE: slirp/util.c:139:
+        return EISCONN;

ERROR: return of an errno should typically be -ve (return -ENOTCONN)
#435: FILE: slirp/util.c:141:
+        return ENOTCONN;

ERROR: return of an errno should typically be -ve (return -ETIMEDOUT)
#437: FILE: slirp/util.c:143:
+        return ETIMEDOUT;

ERROR: return of an errno should typically be -ve (return -ECONNREFUSED)
#439: FILE: slirp/util.c:145:
+        return ECONNREFUSED;

ERROR: return of an errno should typically be -ve (return -ELOOP)
#441: FILE: slirp/util.c:147:
+        return ELOOP;

ERROR: return of an errno should typically be -ve (return -EHOSTUNREACH)
#443: FILE: slirp/util.c:149:
+        return EHOSTUNREACH;

ERROR: return of an errno should typically be -ve (return -EIO)
#445: FILE: slirp/util.c:151:
+        return EIO;

WARNING: line over 80 characters
#514: FILE: slirp/util.h:61:
+#define slirp_recv(sockfd, buf, len, flags) recv(sockfd, (void *)buf, len, flags)

WARNING: Block comments use a leading /* on a separate line
#537: FILE: slirp/util.h:84:
+    /* Enabling the reuse of an endpoint that was used by a socket still in

WARNING: Block comments use a trailing */ on a separate line
#541: FILE: slirp/util.h:88:
+     * http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621.aspx */

total: 51 errors, 7 warnings, 477 lines checked

Patch 11/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

12/32 Checking commit 8bd42a95d10f (slirp: replace qemu_set_nonblock())
13/32 Checking commit 356398ae466c (slirp: add unregister_poll_fd() callback)
ERROR: code indent should never use tabs
#87: FILE: slirp/tcp_subr.c:340:
+^Iso->slirp->cb->unregister_poll_fd(so->s);$

ERROR: code indent should never use tabs
#107: FILE: slirp/udp.c:295:
+^Iso->slirp->cb->unregister_poll_fd(so->s);$

total: 2 errors, 0 warnings, 63 lines checked

Patch 13/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

14/32 Checking commit e1beca1eaecb (slirp: replace qemu_notify_event() with a callback)
ERROR: code indent should never use tabs
#115: FILE: slirp/tcp_input.c:509:
+^I^I^I^Isodrop(so, acked);$

ERROR: code indent should never use tabs
#124: FILE: slirp/tcp_input.c:1121:
+^I^I^Isodrop(so, (int)so->so_snd.sb_cc);$

ERROR: code indent should never use tabs
#128: FILE: slirp/tcp_input.c:1124:
+^I^I^Isodrop(so, acked);$

total: 3 errors, 0 warnings, 79 lines checked

Patch 14/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

15/32 Checking commit 9b30e0cc0b34 (slirp: move QEMU state saving to a separate unit)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#455: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#547: FILE: slirp/state.c:88:
+/* The sbuf has a pair of pointers that are migrated as offsets;

WARNING: Block comments use a leading /* on a separate line
#645: FILE: slirp/state.c:186:
+/* The OS provided ss_family field isn't that portable; it's size

ERROR: if this code is redundant consider removing it
#715: FILE: slirp/state.c:256:
+#if 0

total: 1 errors, 3 warnings, 475 lines checked

Patch 15/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

16/32 Checking commit a1259feabf6c (slirp: do not include qemu headers in libslirp.h public API header)
17/32 Checking commit 86e8eebc8550 (slirp: improve windows headers inclusion)
18/32 Checking commit 04e129b0a0d7 (slirp: add slirp own version of pstrcpy)
WARNING: line over 80 characters
#37: FILE: slirp/tftp.c:219:
+  slirp_pstrcpy((char *)tp->x.tp_error.tp_msg, sizeof(tp->x.tp_error.tp_msg), msg);

ERROR: braces {} are necessary for all arms of this statement
#55: FILE: slirp/util.c:197:
+    if (buf_size <= 0)
[...]

ERROR: space required before the open parenthesis '('
#58: FILE: slirp/util.c:200:
+    for(;;) {

ERROR: braces {} are necessary for all arms of this statement
#60: FILE: slirp/util.c:202:
+        if (c == 0 || q >= buf + buf_size - 1)
[...]

total: 3 errors, 1 warnings, 44 lines checked

Patch 18/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

19/32 Checking commit 5f8ab44f9720 (slirp: remove qemu timer.h dependency)
20/32 Checking commit 9b025159305f (slirp: remove now useless QEMU headers inclusions)
21/32 Checking commit 775dbf578246 (slirp: replace net/eth.h inclusion with own defines)
22/32 Checking commit d918af2891f5 (slirp: replace qemu qtailq with slirp own copy)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#12: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#76: FILE: slirp/qtailq.h:60:
+        struct type *tqh_first;       /* first element */               \

WARNING: Block comments use a leading /* on a separate line
#77: FILE: slirp/qtailq.h:61:
+        QTailQLink tqh_circ;          /* link for circular backwards list */ \

WARNING: Block comments use a leading /* on a separate line
#85: FILE: slirp/qtailq.h:69:
+        struct type *tqe_next;        /* next element */                \

WARNING: Block comments use a leading /* on a separate line
#86: FILE: slirp/qtailq.h:70:
+        QTailQLink tqe_circ;          /* link for circular backwards list */ \

WARNING: Block comments use a leading /* on a separate line
#92: FILE: slirp/qtailq.h:76:
+} while (/*CONSTCOND*/0)

ERROR: do not use assignment in if condition
#95: FILE: slirp/qtailq.h:79:
+        if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)        \

WARNING: Block comments use a leading /* on a separate line
#102: FILE: slirp/qtailq.h:86:
+} while (/*CONSTCOND*/0)

WARNING: Block comments use a leading /* on a separate line
#109: FILE: slirp/qtailq.h:93:
+} while (/*CONSTCOND*/0)

ERROR: do not use assignment in if condition
#112: FILE: slirp/qtailq.h:96:
+        if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\

WARNING: Block comments use a leading /* on a separate line
#119: FILE: slirp/qtailq.h:103:
+} while (/*CONSTCOND*/0)

WARNING: Block comments use a leading /* on a separate line
#126: FILE: slirp/qtailq.h:110:
+} while (/*CONSTCOND*/0)

WARNING: Block comments use a leading /* on a separate line
#136: FILE: slirp/qtailq.h:120:
+} while (/*CONSTCOND*/0)

WARNING: line over 80 characters
#164: FILE: slirp/qtailq.h:148:
+#define QTAILQ_IN_USE(elm, field)        ((elm)->field.tqe_circ.tql_prev != NULL)

WARNING: line over 80 characters
#171: FILE: slirp/qtailq.h:155:
+        ((typeof((elm)->field.tqe_next)) QTAILQ_LINK_PREV((elm)->field.tqe_circ))

WARNING: line over 80 characters
#202: FILE: slirp/qtailq.h:186:
+#define QTAILQ_RAW_INSERT_TAIL(head, elm, entry) do {                           \

WARNING: line over 80 characters
#203: FILE: slirp/qtailq.h:187:
+        *QTAILQ_RAW_NEXT(elm, entry) = NULL;                                    \

WARNING: line over 80 characters
#204: FILE: slirp/qtailq.h:188:
+        QTAILQ_RAW_TQE_CIRC(elm, entry)->tql_prev = QTAILQ_RAW_TQH_CIRC(head)->tql_prev; \

WARNING: line over 80 characters
#205: FILE: slirp/qtailq.h:189:
+        QTAILQ_RAW_TQH_CIRC(head)->tql_prev->tql_next = (elm);                  \

WARNING: line over 80 characters
#206: FILE: slirp/qtailq.h:190:
+        QTAILQ_RAW_TQH_CIRC(head)->tql_prev = QTAILQ_RAW_TQE_CIRC(elm, entry);  \

WARNING: Block comments use a leading /* on a separate line
#207: FILE: slirp/qtailq.h:191:
+} while (/*CONSTCOND*/0)

total: 2 errors, 19 warnings, 202 lines checked

Patch 22/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

23/32 Checking commit 6c2bb4ac5afd (slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT)
24/32 Checking commit 4900a932e93f (slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/)
25/32 Checking commit 46f51c952ba6 (slirp: replace remaining qemu headers dependency)
26/32 Checking commit ba50ea2e008e (slirp: prefer c99 types over BSD kind)
ERROR: code indent should never use tabs
#60: FILE: slirp/ip_icmp.h:47:
+^Iuint8_t^Iicmp_type;^I^I/* type of message, see below */$

ERROR: code indent should never use tabs
#61: FILE: slirp/ip_icmp.h:48:
+^Iuint8_t^Iicmp_code;^I^I/* type sub code */$

WARNING: line over 80 characters
#62: FILE: slirp/ip_icmp.h:49:
+       uint16_t        icmp_cksum;             /* ones complement cksum of struct */

ERROR: code indent should never use tabs
#62: FILE: slirp/ip_icmp.h:49:
+^Iuint16_t^Iicmp_cksum;^I^I/* ones complement cksum of struct */$

ERROR: code indent should never use tabs
#65: FILE: slirp/ip_icmp.h:51:
+^I^Iuint8_t ih_pptr;^I^I^I/* ICMP_PARAMPROB */$

ERROR: code indent should never use tabs
#70: FILE: slirp/ip_icmp.h:54:
+^I^I^Iuint16_t^Iicd_id;$

ERROR: code indent should never use tabs
#71: FILE: slirp/ip_icmp.h:55:
+^I^I^Iuint16_t^Iicd_seq;$

ERROR: code indent should never use tabs
#79: FILE: slirp/ip_icmp.h:61:
+^I^I^Iuint16_t ipm_void;$

ERROR: code indent should never use tabs
#80: FILE: slirp/ip_icmp.h:62:
+^I^I^Iuint16_t ipm_nextmtu;$

ERROR: code indent should never use tabs
#102: FILE: slirp/ip_input.c:461:
+^Iregister char *opts;$

ERROR: code indent should never use tabs
#107: FILE: slirp/ip_input.c:465:
+^Iopts = (char *)(ip + 1);$

ERROR: code indent should never use tabs
#133: FILE: slirp/mbuf.h:88:
+^Ichar *m_data;^I^I^I/* Current location of data */$

ERROR: space prohibited before that close parenthesis ')'
#167: FILE: slirp/slirp.c:95:
+        printf("GetNetworkParams failed. ret = %08x\n", (unsigned)ret );

ERROR: code indent should never use tabs
#231: FILE: slirp/socket.c:509:
+^I    uint8_t code=ICMP_UNREACH_PORT;$

ERROR: spaces required around that '=' (ctx:VxV)
#231: FILE: slirp/socket.c:509:
+           uint8_t code=ICMP_UNREACH_PORT;
                        ^

ERROR: code indent should never use tabs
#255: FILE: slirp/socket.h:64:
+  unsigned^Iso_expire;^I^I/* When the socket will expire */$

ERROR: "foo * bar" should be "foo *bar"
#264: FILE: slirp/socket.h:147:
+struct socket * tcp_listen(Slirp *, uint32_t, unsigned, uint32_t, unsigned,

ERROR: code indent should never use tabs
#286: FILE: slirp/tcp_input.c:200:
+^Ichar *optp = NULL;$

ERROR: code indent should never use tabs
#295: FILE: slirp/tcp_input.c:208:
+^Iuint32_t tiwin;$

ERROR: code indent should never use tabs
#304: FILE: slirp/tcp_input.c:330:
+^I  optp = mtod(m, char *) + sizeof (struct tcpiphdr);$

ERROR: space prohibited between function name and open parenthesis '('
#304: FILE: slirp/tcp_input.c:330:
+         optp = mtod(m, char *) + sizeof (struct tcpiphdr);

ERROR: code indent should never use tabs
#313: FILE: slirp/tcp_input.c:472:
+^I^Itcp_dooptions(tp, (uint8_t *)optp, optlen, ti);$

ERROR: code indent should never use tabs
#322: FILE: slirp/tcp_input.c:727:
+^I    tcp_dooptions(tp, (uint8_t *)optp, optlen, ti);$

ERROR: code indent should never use tabs
#331: FILE: slirp/tcp_input.c:1042:
+^I^I^I^I^Iunsigned win =$

ERROR: code indent should never use tabs
#341: FILE: slirp/tcp_input.c:1111:
+^I^I  register unsigned cw = tp->snd_cwnd;$

ERROR: code indent should never use tabs
#342: FILE: slirp/tcp_input.c:1112:
+^I^I  register unsigned incr = tp->t_maxseg;$

ERROR: code indent should never use tabs
#382: FILE: slirp/tcp_output.c:66:
+^Iuint8_t opt[MAX_TCPOPTLEN];$

ERROR: code indent should never use tabs
#391: FILE: slirp/tcp_output.c:274:
+^I^I^Imemcpy((char *)(opt + 2), (char *)&mss, sizeof(mss));$

ERROR: code indent should never use tabs
#400: FILE: slirp/tcp_output.c:304:
+^I^Isbcopy(&so->so_snd, off, (int) len, mtod(m, char *) + hdrlen);$

ERROR: code indent should never use tabs
#409: FILE: slirp/tcp_output.c:327:
+^Imemcpy((char *)ti, &tp->t_template, sizeof (struct tcpiphdr));$

ERROR: space prohibited between function name and open parenthesis '('
#409: FILE: slirp/tcp_output.c:327:
+       memcpy((char *)ti, &tp->t_template, sizeof (struct tcpiphdr));

ERROR: code indent should never use tabs
#418: FILE: slirp/tcp_output.c:356:
+^I^Imemcpy((char *)(ti + 1), (char *)opt, optlen);$

ERROR: code indent should never use tabs
#431: FILE: slirp/tcp_subr.c:166:
+^I^Im->m_data = (char *)ti;$

ERROR: code indent should never use tabs
#440: FILE: slirp/tcp_subr.c:185:
+^Iti->ti_len = htons((uint16_t)(sizeof (struct tcphdr) + tlen));$

ERROR: space prohibited between function name and open parenthesis '('
#440: FILE: slirp/tcp_subr.c:185:
+       ti->ti_len = htons((uint16_t)(sizeof (struct tcphdr) + tlen));

ERROR: code indent should never use tabs
#449: FILE: slirp/tcp_subr.c:616:
+^Iunsigned n1, n2, n3, n4, n5, n6;$

ERROR: code indent should never use tabs
#453: FILE: slirp/tcp_subr.c:619:
+^Iunsigned lport;$

ERROR: code indent should never use tabs
#462: FILE: slirp/tcp_subr.c:856:
+^I^I^Iuint16_t p;$

ERROR: code indent should never use tabs
#472: FILE: slirp/tcp_subr.c:912:
+^I^I^I^Ilport = (((uint8_t*)bptr)[0] << 8)$

ERROR: "(foo*)" should be "(foo *)"
#472: FILE: slirp/tcp_subr.c:912:
+                               lport = (((uint8_t*)bptr)[0] << 8)

ERROR: code indent should never use tabs
#473: FILE: slirp/tcp_subr.c:913:
+^I^I^I^I+ ((uint8_t *)bptr)[1];$

ERROR: code indent should never use tabs
#483: FILE: slirp/tcp_subr.c:931:
+^I^I^I^I*(uint8_t *)bptr++ = (p >> 8) & 0xff;$

WARNING: line over 80 characters
#497: FILE: slirp/tcp_timer.c:235:
+                unsigned win = MIN(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg;

ERROR: code indent should never use tabs
#510: FILE: slirp/tcp_var.h:50:
+^Iuint16_t^It_maxseg;^I^I/* maximum segment size */$

ERROR: code indent should never use tabs
#513: FILE: slirp/tcp_var.h:52:
+^Iuint16_t^It_flags;$

ERROR: code indent should never use tabs
#522: FILE: slirp/tcp_var.h:108:
+^Iuint16_t^It_rttmin;^I^I/* minimum rtt allowed */$

ERROR: code indent should never use tabs
#534: FILE: slirp/tcp_var.h:119:
+^Iuint8_t^Isnd_scale;^I^I/* window scaling for send window */$

ERROR: code indent should never use tabs
#535: FILE: slirp/tcp_var.h:120:
+^Iuint8_t^Ircv_scale;^I^I/* window scaling for recv window */$

ERROR: code indent should never use tabs
#536: FILE: slirp/tcp_var.h:121:
+^Iuint8_t^Irequest_r_scale;^I/* pending window scaling */$

ERROR: code indent should never use tabs
#537: FILE: slirp/tcp_var.h:122:
+^Iuint8_t^Irequested_s_scale;$

ERROR: code indent should never use tabs
#550: FILE: slirp/udp.c:95:
+^Iuh = (struct udphdr *)((char *)ip + iphlen);$

ERROR: "foo * bar" should be "foo *bar"
#574: FILE: slirp/udp.h:81:
+struct socket * udp_listen(Slirp *, uint32_t, unsigned, uint32_t, unsigned,

ERROR: externs should be avoided in .c files
#587: FILE: util/osdep.c:32:
+extern int madvise(char *, size_t, int);

total: 51 errors, 2 warnings, 455 lines checked

Patch 26/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

27/32 Checking commit 3ca10a4b2d7b (slirp: improve send_packet() callback)
28/32 Checking commit 181ccaa3f973 (slirp: replace global polling with per-instance & notifier)
ERROR: spaces required around that '/' (ctx:VxV)
#237: FILE: slirp/slirp.c:471:
+            (so->so_snd.sb_cc < (so->so_snd.sb_datalen/2))) {
                                                       ^

WARNING: Block comments use a leading /* on a separate line
#565: FILE: slirp/slirp.c:611:
+                    /* Socket error might have resulted in the socket being

WARNING: Block comments use a trailing */ on a separate line
#566: FILE: slirp/slirp.c:612:
+                     * removed, do not try to do anything more with it. */

WARNING: Block comments use a leading /* on a separate line
#594: FILE: slirp/slirp.c:634:
+                    /* Socket error might have resulted in the socket being

WARNING: Block comments use a trailing */ on a separate line
#595: FILE: slirp/slirp.c:635:
+                     * removed, do not try to do anything more with it. */

WARNING: Block comments use a leading /* on a separate line
#653: FILE: slirp/slirp.c:675:
+                        /* Call tcp_output in case we need to send a window

WARNING: Block comments use a trailing */ on a separate line
#655: FILE: slirp/slirp.c:677:
+                         * until it sends a window probe. */

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#817: 
deleted file mode 100644

total: 1 errors, 7 warnings, 829 lines checked

Patch 28/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/32 Checking commit 865ad7fef9e9 (slirp: remove slirp_instances list)
30/32 Checking commit e2e03ac7c5af (slirp: use polling callbacks, drop glib requirement)
31/32 Checking commit 4dd78b51f2f8 (slirp: pass opaque to all callbacks)
WARNING: line over 80 characters
#95: FILE: slirp/dhcpv6.c:62:
+            slirp->cb->guest_error("Guest sent bad DHCPv6 packet!", slirp->opaque);

WARNING: line over 80 characters
#131: FILE: slirp/ip6_icmp.c:28:
+    slirp->ra_timer = slirp->cb->timer_new(ra_timer_handler, slirp, slirp->opaque);

WARNING: line over 80 characters
#276: FILE: slirp/slirp.c:888:
+            ifm->expiration_date = slirp->cb->clock_get_ns(slirp->opaque) + 1000000000ULL;

ERROR: code indent should never use tabs
#310: FILE: slirp/tcp_subr.c:339:
+^Iso->slirp->cb->unregister_poll_fd(so->s, so->slirp->opaque);$

ERROR: code indent should never use tabs
#350: FILE: slirp/udp.c:294:
+^Iso->slirp->cb->unregister_poll_fd(so->s, so->slirp->opaque);$

total: 2 errors, 3 warnings, 273 lines checked

Patch 31/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

32/32 Checking commit cdc1e8f63e44 (slirp: API is extern C)
WARNING: architecture specific defines should be avoided
#21: FILE: slirp/libslirp.h:15:
+#ifdef __cplusplus

WARNING: architecture specific defines should be avoided
#33: FILE: slirp/libslirp.h:103:
+#ifdef __cplusplus

total: 0 errors, 2 warnings, 19 lines checked

Patch 32/32 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/20190205165927.26599-1-samuel.thibault@ens-lyon.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PULLv2 00/32] More work towards libslirp
Posted by Peter Maydell 5 years, 1 month ago
On Tue, 5 Feb 2019 at 16:59, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
>
> The following changes since commit 01a9a51ffaf4699827ea6425cb2b834a356e159d:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190205-pull-request' into staging (2019-02-05 14:01:29 +0000)
>
> are available in the Git repository at:
>
>   https://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
>
> for you to fetch changes up to cf20be34d44a953c9b52a4d5cf6f4232968e6f3c:
>
>   slirp: API is extern C (2019-02-05 18:56:17 +0200)
>
> ----------------------------------------------------------------
> More work towards libslirp

Fails to build, ppc64, x86-64, aarch32, s390x, etc:

/home/pm215/qemu/slirp/misc.c: In function ‘g_spawn_async_with_fds_slirp’:
/home/pm215/qemu/slirp/misc.c:166:5: error: unknown type name ‘QemuGSpawnFds’
     QemuGSpawnFds setup = {
     ^
/home/pm215/qemu/slirp/misc.c:167:9: error: field name not in record
or union initializer
         .child_setup = child_setup,
         ^
/home/pm215/qemu/slirp/misc.c:167:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:167:9: error: initialization makes
integer from pointer without a cast [-Werror]
/home/pm215/qemu/slirp/misc.c:167:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:168:9: error: field name not in record
or union initializer
         .user_data = user_data,
         ^
/home/pm215/qemu/slirp/misc.c:168:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:168:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:168:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:169:9: error: field name not in record
or union initializer
         .stdin_fd = stdin_fd,
         ^
/home/pm215/qemu/slirp/misc.c:169:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:169:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:169:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:170:9: error: field name not in record
or union initializer
         .stdout_fd = stdout_fd,
         ^
/home/pm215/qemu/slirp/misc.c:170:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:170:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:170:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:171:9: error: field name not in record
or union initializer
         .stderr_fd = stderr_fd,
         ^
/home/pm215/qemu/slirp/misc.c:171:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:171:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:171:9: error: (near initialization for
‘setup’) [-Werror]
cc1: all warnings being treated as errors

FreeBSD fails in a slightly different way:

slirp/misc.c:166:5: error: use of undeclared identifier 'QemuGSpawnFds'
    QemuGSpawnFds setup = {
    ^
slirp/misc.c:175:51: error: use of undeclared identifier 'setup'
                         slirp_gspawn_fds_setup, &setup,
                                                  ^
2 errors generated.

thanks
-- PMM

Re: [Qemu-devel] [PULLv2 00/32] More work towards libslirp
Posted by Samuel Thibault 5 years, 1 month ago
Peter Maydell, le mar. 05 févr. 2019 18:24:45 +0000, a ecrit:
> /home/pm215/qemu/slirp/misc.c:166:5: error: unknown type name ‘QemuGSpawnFds’

D'oh...

Fixed in v3.

Samuel