From nobody Wed Oct 02 21:41:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJpCZ6nFsz5Y7g2; Wed, 02 Oct 2024 21:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJpCZ22Vdz4njh; Wed, 2 Oct 2024 21:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727905274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLy0v65ROqSkWzHPexv9j49sm2qdwGugdP4eUAKCtsY=; b=jXYNsycyycc+nZTqwUfPaX1zolzqVe08Egy0J+thbYWAMKE+0ZqWw4/VHqkwAEY0uHwpGJ QRA1GnuxHooyTJ/233EQ4oAcMWngtOZDnEDL5VdL0pS/sqLit8cgeYNpGUFm3kmhhCMqyM CL2d1vav8EhnHNx5oAy6XRbJXlwTwrkzF7q9GqnUgiMd8PYHLcToCNSiNh3I1RRxqqzLU3 kJK5eniA//34xsgj3bdazTy0bAtAOIyZ7b7DRu4U7rq0mrxnLU006Rk1XvKnqoOXTnaPKe G6KoXXqd+kuta6FTyhdXjCmpTPY91EwbkHOsZXaezm20AtmnIS5kvmS17MLIng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727905274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aLy0v65ROqSkWzHPexv9j49sm2qdwGugdP4eUAKCtsY=; b=aX+DhcOOxuvJTsRV/c6goUBIivjdg4tDNT3xwgW0nVVa1LgJYZblbpVp+aEzMmDiEBYZ06 F29n3kWA2QIj4agdns3/Q3qbkiYiKAvT6b29MawbF3Jo8mtBJMk+YKDWK/eDNGOS6Yi+h0 Ul6ajjFQS6pjMsPXXy/CfFdZEiThv2SlxJ7OhVb1yEiVSUTF3iaeaSvuuMPNf/StOQrcd1 QiMQzfRSR600IIa0XYoKUe0W1viKLAgakznKjyqTPBcAXB55a7V00kFEwU5LirgiXJbf/k VD8pQRgCMTQcHea755y6kxavV+ePkq5GMuiZ9pa0CE6UNO+AmaHQD92C2yPTsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727905274; a=rsa-sha256; cv=none; b=q5r7g1vf8ynLOV+7YmIxzuU/Nznb+/Z/wXYt8BYNB/Or3PoKeenkUm2vwtd4FxaLN8PYRt xGQ64DBqCHgVmxewGCsVZ/Zesi0nAm/ViHKiVC+JSGsqMFE1H07IbMeJxmepEJk6Gpflny eW3uFXI2FJeLYvDzEz6971vW/RexsMII1TtrhL0bTvwclhW1jZY2m9PKcQlOQmUPUBdI37 ctCw1pOfPeu7Pf6bVIP45sG3j/xrPLb6UVJQbOKOLNcSa4IxHlP0AUnra7OXLvjFDoM4gY vd74/n/8ek8N5kWtlZZHN6EbmwjZZikxtuLnOBwlnEQ8mfA+txIQqy4C/RlTAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJpCZ1cSPzN2X; Wed, 2 Oct 2024 21:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 492LfEsm043612; Wed, 2 Oct 2024 21:41:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492LfE2l043599; Wed, 2 Oct 2024 21:41:14 GMT (envelope-from git) Date: Wed, 2 Oct 2024 21:41:14 GMT Message-Id: <202410022141.492LfE2l043599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ad152571b8fd - main - bhyve uart: Fix errors from GCC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad152571b8fd69d93ca0e44d80c9b49308b36eae Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ad152571b8fd69d93ca0e44d80c9b49308b36eae commit ad152571b8fd69d93ca0e44d80c9b49308b36eae Author: John Baldwin AuthorDate: 2024-10-02 21:31:59 +0000 Commit: John Baldwin CommitDate: 2024-10-02 21:31:59 +0000 bhyve uart: Fix errors from GCC - Place 'static' before other qualifiers (-Wold-style-declaration) - Correct the order of arguments to calloc (-Wcalloc-transposed-args) Reported by: GCC 14 Fixes: 1f903953fbf8 bhyve: Add raw tcp to uart backend --- usr.sbin/bhyve/uart_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/uart_backend.c b/usr.sbin/bhyve/uart_backend.c index a09764190137..32490105fecf 100644 --- a/usr.sbin/bhyve/uart_backend.c +++ b/usr.sbin/bhyve/uart_backend.c @@ -293,7 +293,7 @@ done: static void uart_tcp_listener(int fd, enum ev_type type __unused, void *arg) { - const static char tcp_error_msg[] = "Socket already connected\n"; + static const char tcp_error_msg[] = "Socket already connected\n"; struct uart_socket_softc *socket_softc = (struct uart_socket_softc *) arg; struct uart_softc *sc = socket_softc->softc; @@ -473,7 +473,7 @@ uart_tcp_backend(struct uart_softc *sc, const char *path, * Set the connection softc structure, which includes both the softc * and the drain function provided by the frontend. */ - if ((socket_softc = calloc(sizeof(struct uart_socket_softc), 1)) == + if ((socket_softc = calloc(1, sizeof(struct uart_socket_softc))) == NULL) goto clean;