Message ID | 20190205182848.29887-1-samuel.thibault@ens-lyon.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Patchew URL: https://patchew.org/QEMU/20190205182848.29887-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] [PULLv3 00/32] More work towards libslirp Type: series Message-id: 20190205182848.29887-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 9669c97562..47994e16b1 master -> master t [tag update] patchew/1549371525-29899-1-git-send-email-thuth@redhat.com -> patchew/1549371525-29899-1-git-send-email-thuth@redhat.com * [new tag] patchew/20190205181218.8995-1-peter.maydell@linaro.org -> patchew/20190205181218.8995-1-peter.maydell@linaro.org * [new tag] patchew/20190205182848.29887-1-samuel.thibault@ens-lyon.org -> patchew/20190205182848.29887-1-samuel.thibault@ens-lyon.org Switched to a new branch 'test' 48788f32b8 slirp: API is extern C 3d1cdcf3da slirp: pass opaque to all callbacks 0d81dddc82 slirp: use polling callbacks, drop glib requirement d01c351f90 slirp: remove slirp_instances list 1270fcc441 slirp: replace global polling with per-instance & notifier b8897fc434 slirp: improve send_packet() callback b664c28b37 slirp: prefer c99 types over BSD kind 09e965067c slirp: replace remaining qemu headers dependency 3724a91777 slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/ 53b357d14c slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT 3ea01d196d slirp: replace qemu qtailq with slirp own copy a481fdc029 slirp: replace net/eth.h inclusion with own defines fa670ffa71 slirp: remove now useless QEMU headers inclusions a30ea55480 slirp: remove qemu timer.h dependency 8d9af67bc6 slirp: add slirp own version of pstrcpy 8c230c3803 slirp: improve windows headers inclusion ef56e8d421 slirp: do not include qemu headers in libslirp.h public API header 5ac5a10014 slirp: move QEMU state saving to a separate unit 0abf445228 slirp: replace qemu_notify_event() with a callback 12c6d0ef34 slirp: add unregister_poll_fd() callback 1985ed9e0c slirp: replace qemu_set_nonblock() c6403fae65 slirp: replace most qemu socket utilities with slirp own version bae9e17858 slirp: replace QEMU_PACKED with SLIRP_PACKED cb52c8a00b slirp: replace trace functions with DEBUG calls cc0a0b1889 slirp: add callbacks for timer 51a1cf007b net/slirp: fix leaks on forwarding rule registration error 9e775ae01f net/slirp: free forwarding rules on cleanup 2a3e11c41e net/slirp: simplify checking for cmd: prefix 18e1d03b03 slirp: generalize guestfwd with a callback based approach 60aeb1455e slirp: Don't mark struct ipq or struct ipasfrag as packed 81efc1aad8 slirp: Avoid marking naturally packed structs as QEMU_PACKED 9de8154ed7 slirp: Avoid unaligned 16bit memory access === OUTPUT BEGIN === 1/32 Checking commit 9de8154ed708 (slirp: Avoid unaligned 16bit memory access) 2/32 Checking commit 81efc1aad888 (slirp: Avoid marking naturally packed structs as QEMU_PACKED) 3/32 Checking commit 60aeb1455ea7 (slirp: Don't mark struct ipq or struct ipasfrag as packed) 4/32 Checking commit 18e1d03b0387 (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 2a3e11c41e31 (net/slirp: simplify checking for cmd: prefix) 6/32 Checking commit 9e775ae01fc4 (net/slirp: free forwarding rules on cleanup) 7/32 Checking commit 51a1cf007bb8 (net/slirp: fix leaks on forwarding rule registration error) 8/32 Checking commit cc0a0b1889f8 (slirp: add callbacks for timer) 9/32 Checking commit cb52c8a00b9f (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 bae9e1785826 (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 c6403fae651b (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 1985ed9e0c68 (slirp: replace qemu_set_nonblock()) 13/32 Checking commit 12c6d0ef34b7 (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 0abf4452285c (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 5ac5a1001413 (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 ef56e8d421c6 (slirp: do not include qemu headers in libslirp.h public API header) 17/32 Checking commit 8c230c38036a (slirp: improve windows headers inclusion) 18/32 Checking commit 8d9af67bc67d (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 a30ea5548007 (slirp: remove qemu timer.h dependency) 20/32 Checking commit fa670ffa7129 (slirp: remove now useless QEMU headers inclusions) 21/32 Checking commit a481fdc02925 (slirp: replace net/eth.h inclusion with own defines) 22/32 Checking commit 3ea01d196d45 (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 53b357d14c7a (slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT) 24/32 Checking commit 3724a9177731 (slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/) 25/32 Checking commit 09e965067cbb (slirp: replace remaining qemu headers dependency) 26/32 Checking commit b664c28b37ad (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 b8897fc434b7 (slirp: improve send_packet() callback) 28/32 Checking commit 1270fcc4411f (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 d01c351f9047 (slirp: remove slirp_instances list) 30/32 Checking commit 0d81dddc821d (slirp: use polling callbacks, drop glib requirement) 31/32 Checking commit 3d1cdcf3da5b (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 48788f32b83b (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/20190205182848.29887-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
Patchew URL: https://patchew.org/QEMU/20190205182848.29887-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] [PULLv3 00/32] More work towards libslirp Message-id: 20190205182848.29887-1-samuel.thibault@ens-lyon.org Type: series === 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 9669c97..47994e1 master -> master - [tag update] patchew/1549371525-29899-1-git-send-email-thuth@redhat.com -> patchew/1549371525-29899-1-git-send-email-thuth@redhat.com * [new tag] patchew/20190205182848.29887-1-samuel.thibault@ens-lyon.org -> patchew/20190205182848.29887-1-samuel.thibault@ens-lyon.org Submodule 'capstone' (https://git.qemu.org/git/capstone.git) registered for path 'capstone' Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc' Submodule 'roms/QemuMacDrivers' (https://git.qemu.org/git/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers' Submodule 'roms/SLOF' (https://git.qemu.org/git/SLOF.git) registered for path 'roms/SLOF' Submodule 'roms/ipxe' (https://git.qemu.org/git/ipxe.git) registered for path 'roms/ipxe' Submodule 'roms/openbios' (https://git.qemu.org/git/openbios.git) registered for path 'roms/openbios' Submodule 'roms/openhackware' (https://git.qemu.org/git/openhackware.git) registered for path 'roms/openhackware' Submodule 'roms/qemu-palcode' (https://git.qemu.org/git/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (https://git.qemu.org/git/seabios.git/) registered for path 'roms/seabios' Submodule 'roms/seabios-hppa' (https://github.com/hdeller/seabios-hppa.git) registered for path 'roms/seabios-hppa' Submodule 'roms/sgabios' (https://git.qemu.org/git/sgabios.git) registered for path 'roms/sgabios' Submodule 'roms/skiboot' (https://git.qemu.org/git/skiboot.git) registered for path 'roms/skiboot' Submodule 'roms/u-boot' (https://git.qemu.org/git/u-boot.git) registered for path 'roms/u-boot' Submodule 'roms/u-boot-sam460ex' (https://git.qemu.org/git/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex' Submodule 'tests/fp/berkeley-softfloat-3' (https://github.com/cota/berkeley-softfloat-3) registered for path 'tests/fp/berkeley-softfloat-3' Submodule 'tests/fp/berkeley-testfloat-3' (https://github.com/cota/berkeley-testfloat-3) registered for path 'tests/fp/berkeley-testfloat-3' Submodule 'ui/keycodemapdb' (https://git.qemu.org/git/keycodemapdb.git) registered for path 'ui/keycodemapdb' Cloning into 'capstone'... Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf' Cloning into 'dtc'... Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536' Cloning into 'roms/QemuMacDrivers'... Submodule path 'roms/QemuMacDrivers': checked out '90c488d5f4a407342247b9ea869df1c2d9c8e266' Cloning into 'roms/SLOF'... Submodule path 'roms/SLOF': checked out 'a5b428e1c1eae703bdd62a3f527223c291ee3fdc' Cloning into 'roms/ipxe'... Submodule path 'roms/ipxe': checked out 'de4565cbe76ea9f7913a01f331be3ee901bb6e17' Cloning into 'roms/openbios'... Submodule path 'roms/openbios': checked out '441a84d3a642a10b948369c63f32367e8ff6395b' Cloning into 'roms/openhackware'... Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5' Cloning into 'roms/qemu-palcode'... Submodule path 'roms/qemu-palcode': checked out '51c237d7e20d05100eacadee2f61abc17e6bc097' Cloning into 'roms/seabios'... Submodule path 'roms/seabios': checked out 'a698c8995ffb2838296ec284fe3c4ad33dfca307' Cloning into 'roms/seabios-hppa'... Submodule path 'roms/seabios-hppa': checked out '1ef99a01572c2581c30e16e6fe69e9ea2ef92ce0' Cloning into 'roms/sgabios'... Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a' Cloning into 'roms/skiboot'... Submodule path 'roms/skiboot': checked out 'e0ee24c27a172bcf482f6f2bc905e6211c134bcc' Cloning into 'roms/u-boot'... Submodule path 'roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943' Cloning into 'roms/u-boot-sam460ex'... Submodule path 'roms/u-boot-sam460ex': checked out '60b3916f33e617a815973c5a6df77055b2e3a588' Cloning into 'tests/fp/berkeley-softfloat-3'... Submodule path 'tests/fp/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037' Cloning into 'tests/fp/berkeley-testfloat-3'... Submodule path 'tests/fp/berkeley-testfloat-3': checked out '5a59dcec19327396a011a17fd924aed4fec416b3' Cloning into 'ui/keycodemapdb'... Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce' Switched to a new branch 'test' 48788f3 slirp: API is extern C 3d1cdcf slirp: pass opaque to all callbacks 0d81ddd slirp: use polling callbacks, drop glib requirement d01c351 slirp: remove slirp_instances list 1270fcc slirp: replace global polling with per-instance & notifier b8897fc slirp: improve send_packet() callback b664c28 slirp: prefer c99 types over BSD kind 09e9650 slirp: replace remaining qemu headers dependency 3724a91 slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/ 53b357d slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT 3ea01d1 slirp: replace qemu qtailq with slirp own copy a481fdc slirp: replace net/eth.h inclusion with own defines fa670ff slirp: remove now useless QEMU headers inclusions a30ea55 slirp: remove qemu timer.h dependency 8d9af67 slirp: add slirp own version of pstrcpy 8c230c3 slirp: improve windows headers inclusion ef56e8d slirp: do not include qemu headers in libslirp.h public API header 5ac5a10 slirp: move QEMU state saving to a separate unit 0abf445 slirp: replace qemu_notify_event() with a callback 12c6d0e slirp: add unregister_poll_fd() callback 1985ed9 slirp: replace qemu_set_nonblock() c6403fa slirp: replace most qemu socket utilities with slirp own version bae9e17 slirp: replace QEMU_PACKED with SLIRP_PACKED cb52c8a slirp: replace trace functions with DEBUG calls cc0a0b1 slirp: add callbacks for timer 51a1cf0 net/slirp: fix leaks on forwarding rule registration error 9e775ae net/slirp: free forwarding rules on cleanup 2a3e11c net/slirp: simplify checking for cmd: prefix 18e1d03 slirp: generalize guestfwd with a callback based approach 60aeb14 slirp: Don't mark struct ipq or struct ipasfrag as packed 81efc1a slirp: Avoid marking naturally packed structs as QEMU_PACKED 9de8154 slirp: Avoid unaligned 16bit memory access === OUTPUT BEGIN === 1/32 Checking commit 9de8154ed708 (slirp: Avoid unaligned 16bit memory access) 2/32 Checking commit 81efc1aad888 (slirp: Avoid marking naturally packed structs as QEMU_PACKED) 3/32 Checking commit 60aeb1455ea7 (slirp: Don't mark struct ipq or struct ipasfrag as packed) 4/32 Checking commit 18e1d03b0387 (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 2a3e11c41e31 (net/slirp: simplify checking for cmd: prefix) 6/32 Checking commit 9e775ae01fc4 (net/slirp: free forwarding rules on cleanup) 7/32 Checking commit 51a1cf007bb8 (net/slirp: fix leaks on forwarding rule registration error) 8/32 Checking commit cc0a0b1889f8 (slirp: add callbacks for timer) 9/32 Checking commit cb52c8a00b9f (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 bae9e1785826 (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 c6403fae651b (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 1985ed9e0c68 (slirp: replace qemu_set_nonblock()) 13/32 Checking commit 12c6d0ef34b7 (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 0abf4452285c (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 5ac5a1001413 (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 ef56e8d421c6 (slirp: do not include qemu headers in libslirp.h public API header) 17/32 Checking commit 8c230c38036a (slirp: improve windows headers inclusion) 18/32 Checking commit 8d9af67bc67d (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 a30ea5548007 (slirp: remove qemu timer.h dependency) 20/32 Checking commit fa670ffa7129 (slirp: remove now useless QEMU headers inclusions) 21/32 Checking commit a481fdc02925 (slirp: replace net/eth.h inclusion with own defines) 22/32 Checking commit 3ea01d196d45 (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 53b357d14c7a (slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT) 24/32 Checking commit 3724a9177731 (slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/) 25/32 Checking commit 09e965067cbb (slirp: replace remaining qemu headers dependency) 26/32 Checking commit b664c28b37ad (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 b8897fc434b7 (slirp: improve send_packet() callback) 28/32 Checking commit 1270fcc4411f (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 d01c351f9047 (slirp: remove slirp_instances list) 30/32 Checking commit 0d81dddc821d (slirp: use polling callbacks, drop glib requirement) 31/32 Checking commit 3d1cdcf3da5b (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 48788f32b83b (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/20190205182848.29887-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
On Tue, 5 Feb 2019 at 18:28, 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 1e924479dce65a26a7432bf5920f89c1bf957d74: > > slirp: API is extern C (2019-02-05 20:27:27 +0200) > > ---------------------------------------------------------------- > More work towards libslirp > Format string issues for the Windows build: /home/petmay01/qemu-for-merges/slirp/slirp.c: In function 'slirp_send_packet_all': /home/petmay01/qemu-for-merges/slirp/slirp.c:1116:20: error: unknown conversion type character 'z' in format [-Werror=format=] g_critical("Failed to send packet, ret: %zd", ret); ^ /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/glib-2.0/glib/gmessages.h:333:32: note: in definition of macro 'g_critical' __VA_ARGS__) ^ /home/petmay01/qemu-for-merges/slirp/slirp.c:1116:20: error: too many arguments for format [-Werror=format-extra-args] g_critical("Failed to send packet, ret: %zd", ret); ^ /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/glib-2.0/glib/gmessages.h:333:32: note: in definition of macro 'g_critical' __VA_ARGS__) ^ /home/petmay01/qemu-for-merges/slirp/slirp.c:1118:21: error: unknown conversion type character 'z' in format [-Werror=format=] DEBUG_ERROR("send_packet() didn't send all data: %zd < %zu", ret, len); ^ /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/glib-2.0/glib/gmessages.h:342:32: note: in definition of macro 'g_debug' __VA_ARGS__) ^ /home/petmay01/qemu-for-merges/slirp/slirp.c:1118:9: note: in expansion of macro 'DEBUG_ERROR' DEBUG_ERROR("send_packet() didn't send all data: %zd < %zu", ret, len); ^ /home/petmay01/qemu-for-merges/slirp/slirp.c:1118:21: error: unknown conversion type character 'z' in format [-Werror=format=] DEBUG_ERROR("send_packet() didn't send all data: %zd < %zu", ret, len); ^ /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/glib-2.0/glib/gmessages.h:342:32: note: in definition of macro 'g_debug' __VA_ARGS__) ^ /home/petmay01/qemu-for-merges/slirp/slirp.c:1118:9: note: in expansion of macro 'DEBUG_ERROR' DEBUG_ERROR("send_packet() didn't send all data: %zd < %zu", ret, len); ^ /home/petmay01/qemu-for-merges/slirp/slirp.c:1118:21: error: too many arguments for format [-Werror=format-extra-args] DEBUG_ERROR("send_packet() didn't send all data: %zd < %zu", ret, len); ^ /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/include/glib-2.0/glib/gmessages.h:342:32: note: in definition of macro 'g_debug' __VA_ARGS__) ^ /home/petmay01/qemu-for-merges/slirp/slirp.c:1118:9: note: in expansion of macro 'DEBUG_ERROR' DEBUG_ERROR("send_packet() didn't send all data: %zd < %zu", ret, len); ^ cc1: all warnings being treated as errors All the other builds went OK. thanks -- PMM
On Thu, Feb 07, 2019 at 11:46:23AM +0000, Peter Maydell wrote: > On Tue, 5 Feb 2019 at 18:28, 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 1e924479dce65a26a7432bf5920f89c1bf957d74: > > > > slirp: API is extern C (2019-02-05 20:27:27 +0200) > > > > ---------------------------------------------------------------- > > More work towards libslirp > > > > Format string issues for the Windows build: > > /home/petmay01/qemu-for-merges/slirp/slirp.c: In function > 'slirp_send_packet_all': > /home/petmay01/qemu-for-merges/slirp/slirp.c:1116:20: error: unknown > conversion type character 'z' in format [-Werror=format=] > g_critical("Failed to send packet, ret: %zd", ret); > ^ Note that with any of the glib functions that take a format string, you *must* use the glib format macros, not the system provided format macros. ie G_*_FORMAT, not any of the PRI* macros from stdint.h. This is because you can't assume that the glib functions call through to the platform's own printf impl. See: https://developer.gnome.org/glib/stable/glib-Basic-Types.html Regards, Daniel
Peter Maydell, le jeu. 07 févr. 2019 11:46:23 +0000, a ecrit: > On Tue, 5 Feb 2019 at 18:28, 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 1e924479dce65a26a7432bf5920f89c1bf957d74: > > > > slirp: API is extern C (2019-02-05 20:27:27 +0200) > > > > ---------------------------------------------------------------- > > More work towards libslirp > > > > Format string issues for the Windows build: Oh, I am not getting these errors with make docker-test-mingw@fedora, perhaps something would need to be fixed there to test as much as you do? > All the other builds went OK. Good :) I'll have a look at these formatting issues. Samuel
Hi On Thu, Feb 7, 2019 at 2:31 PM Samuel Thibault <samuel.thibault@gnu.org> wrote: > > Peter Maydell, le jeu. 07 févr. 2019 11:46:23 +0000, a ecrit: > > On Tue, 5 Feb 2019 at 18:28, 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 1e924479dce65a26a7432bf5920f89c1bf957d74: > > > > > > slirp: API is extern C (2019-02-05 20:27:27 +0200) > > > > > > ---------------------------------------------------------------- > > > More work towards libslirp > > > > > > > Format string issues for the Windows build: > > Oh, I am not getting these errors with make docker-test-mingw@fedora, > perhaps something would need to be fixed there to test as much as you do? > > > All the other builds went OK. > > Good :) I'll have a look at these formatting issues. > I am also unable to reproduce yet. Any hint on how to reproduce? I wonder if this is related to __USE_MINGW_ANSI_STDIO somehow (could be, although glib doesn't use the same functions, the compiler might not know the difference) In any case, we should replace %PRI & %z with glib equivalents under slirp/. -- Marc-André Lureau
On Thu, 7 Feb 2019 at 13:53, Marc-André Lureau <marcandre.lureau@gmail.com> wrote: > I am also unable to reproduce yet. Any hint on how to reproduce? > > I wonder if this is related to __USE_MINGW_ANSI_STDIO somehow (could > be, although glib doesn't use the same functions, the compiler might > not know the difference) I do the windows builds using the https://mxe.cc/ cross tools and libs. thanks -- PMM
On Thu, Feb 07, 2019 at 03:29:35PM +0200, Samuel Thibault wrote: > Peter Maydell, le jeu. 07 févr. 2019 11:46:23 +0000, a ecrit: > > On Tue, 5 Feb 2019 at 18:28, 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 1e924479dce65a26a7432bf5920f89c1bf957d74: > > > > > > slirp: API is extern C (2019-02-05 20:27:27 +0200) > > > > > > ---------------------------------------------------------------- > > > More work towards libslirp > > > > > > > Format string issues for the Windows build: > > Oh, I am not getting these errors with make docker-test-mingw@fedora, > perhaps something would need to be fixed there to test as much as you do? You're seeing a difference due to the version of glib2 that's built. Previously the GLIB_*_FORMAT macros would contain the win32 platform specific formats, and the g_critical function would be annotated with 'printf'. Now GLib2's GLIB_*_FORMAT macros will contain the GNU compatible formats, and the g_critical function would be annotated 'gnu_printf'. So your Fedora build test used the gnu_printf based glib2 and so didn't trigger the warnings. Peter's build probably uses an older glib. Regards, Daniel