From nobody Fri Nov 18 19:13:05 2022 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 4NDRJK6W7Rz4dGtv; Fri, 18 Nov 2022 19:13:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NDRJK5NtYz3LZv; Fri, 18 Nov 2022 19:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668798785; 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=VR6WysMSvwA9lTdxRngQT/jHoCvHOoIA61o2tSfyPo8=; b=C63HuL+Wi7DQgZFdy5LKG/gydxNfv/i/YLGu45tXi/cMFIckL7j5ALyEPS8sGEVGCk3XYu 5f/U5UZxNWnOr6zfnmzHAIruRKKuq9jIT+kvM6fegy/9QNkZIy4gj4gzvK3ooGnjCuyGIR ruIs4BKPNDsqzZSgx+5sedk2KfiY+t8a7XqGtikacQ/7HdmTxl0pU0Kw591+JzuCf7pe5J b8AKNohlAXsG264IRZKQlJ4sYTWQxGJi4+2LL4qNns3RCsNKops3N4WhIDEmB0I5svoeDr NQhJTPu8C4wVK5Z0RrYDddkcnGLTS1YSg9UgrMa0XeakuwaMVd3aZlTNl91zcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668798785; 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=VR6WysMSvwA9lTdxRngQT/jHoCvHOoIA61o2tSfyPo8=; b=sF8jPBRlVczAbBIIW9Ttq3xyVBfF7VtvloVDSVRX8YDP9MfN4vuXVp2E9CiYJdnT+vjs2n 7t1wzqU0uewM6tLX0+pip36zi7wEr4SlMclsWemVj0whwzv2UhyREuUz9DFCVA3Tm6ToAl 9jtE+WcQIKWqH9nPm0pvhdgBie6DV47vaM34CsEJVIbLdI+9hdsraG5QV/3IZEHP4f+qk6 BVTSmcB38SiFFaCKGd3Z+HUq4Em22E8EskLAiyLHo4V6UtQ8EidckUnrT/XnnP+umby+av HChzaRasp01WIvV9GTukKD9J0ZiW9PaRlg5aVQQcCNgk4xabuqdHSsmZM5achQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668798785; a=rsa-sha256; cv=none; b=rGRBjLEWlgwtBHdloCyzgs72Cg9Hh0qLcV4NaCfFRRMhie6W3SPYmx/24oWyVDdEynVpw1 1mjMtNSp7DqOhOL6NCvHGzoUZ/b5qJh4C97qpVsw8dx8NYumDdAEaxJG1kEfQe/2+7g4oW vkJpsv3vqlvY0kpDiu1crOWlvTptAt1sU7cQmoYo+nL04phvUMIeoChRaKYPXGGEbV4gPv lUnxI4eF8osvFA7Bqr/w8y+QYFqVIcRdCNy3w9276MhzqUPpwNnbtwNrGCaTCchftB/UyX K5nINdQE5tUJeajlGHRAkDh9wuDdjf3g5jE9dvldT/gwE0eHfwjWuBKwAHAwjg== 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 4NDRJK4TRbzJ4p; Fri, 18 Nov 2022 19:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AIJD5cb001649; Fri, 18 Nov 2022 19:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AIJD57t001648; Fri, 18 Nov 2022 19:13:05 GMT (envelope-from git) Date: Fri, 18 Nov 2022 19:13:05 GMT Message-Id: <202211181913.2AIJD57t001648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c127c61efa4d - main - bhyve: Let BASL compile with raised warnings 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c127c61efa4d8414be9a7373b50c7f348b6e461e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c127c61efa4d8414be9a7373b50c7f348b6e461e commit c127c61efa4d8414be9a7373b50c7f348b6e461e Author: Mark Johnston AuthorDate: 2022-11-18 19:07:20 +0000 Commit: Mark Johnston CommitDate: 2022-11-18 19:11:48 +0000 bhyve: Let BASL compile with raised warnings - Make basl_dump() as unused. - Avoid arithmetic on a void pointer. - Avoid a signed/unsigned comparison with BASL_TABLE_CHECKSUM_LEN_FULL_TABLE. - Ignore warnings about unused parameters from stuff pulled in by acpi.h. In particular, any prototype wrapped by ACPI_DBG_DEPENDENT_RETURN_VOID() will raise such parameters unless ACPI_DEBUG_OUTPUT is defined. Reviewed by: corvink, jhb Differential Revision: https://reviews.freebsd.org/D37397 --- usr.sbin/bhyve/basl.c | 7 +++---- usr.sbin/bhyve/basl.h | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/basl.c b/usr.sbin/bhyve/basl.c index e8724b857381..8c01f16895cd 100644 --- a/usr.sbin/bhyve/basl.c +++ b/usr.sbin/bhyve/basl.c @@ -49,8 +49,7 @@ struct basl_table { uint32_t len; uint32_t off; uint32_t alignment; - STAILQ_HEAD(basl_table_checksum_list, - basl_table_checksum) checksums; + STAILQ_HEAD(basl_table_checksum_list, basl_table_checksum) checksums; STAILQ_HEAD(basl_table_length_list, basl_table_length) lengths; STAILQ_HEAD(basl_table_pointer_list, basl_table_pointer) pointers; }; @@ -110,7 +109,7 @@ basl_dump_table(const struct basl_table *const table, const bool mem) return (0); } -static int +static int __unused basl_dump(const bool mem) { struct basl_table *table; @@ -279,7 +278,7 @@ basl_finish_set_length(struct basl_table *const table) assert(length->off < table->len); assert(length->off + length->size <= table->len); - basl_le_enc(table->data + length->off, table->len, + basl_le_enc((uint8_t *)table->data + length->off, table->len, length->size); } diff --git a/usr.sbin/bhyve/basl.h b/usr.sbin/bhyve/basl.h index aab4a16a63f5..eef252bd1248 100644 --- a/usr.sbin/bhyve/basl.h +++ b/usr.sbin/bhyve/basl.h @@ -6,7 +6,10 @@ #pragma once +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-parameter" #include +#pragma clang diagnostic pop #define ACPI_GAS_ACCESS_WIDTH_LEGACY 0 #define ACPI_GAS_ACCESS_WIDTH_UNDEFINED 0 @@ -20,7 +23,7 @@ #define BASL_TABLE_ALIGNMENT 0x10 #define BASL_TABLE_ALIGNMENT_FACS 0x40 -#define BASL_TABLE_CHECKSUM_LEN_FULL_TABLE (-1) +#define BASL_TABLE_CHECKSUM_LEN_FULL_TABLE (-1U) #define BASL_EXEC(x) \ do { \