From nobody Thu Jan 26 20:27:07 2023 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 4P2sgv5lfJz3btHf; Thu, 26 Jan 2023 20:27:07 +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 4P2sgv4y4gz3Qb5; Thu, 26 Jan 2023 20:27:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674764827; 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=Om0KsM1dDbgW0CYm2HGO+iUltLSaGQQczIUyQKbZ2DA=; b=J7ut5rg0+72JGaMQDXb4kTwcE2HtF8TFU+r5MhmpRQ8xMUNmseqOIO0htps1e6lf7ikPuG 76kP98IVyEWsXpVfaIWLv2EA8G4laVrVaPmSTLxxi+D1qfFmL92MgYJtKT9DutiNfnhDkH eaQ/mB1mvGhZj5xjLmeC4HWHDEfPXrYE4Q5eSUdVKkoBt18LQumbBZcVx94L/sQq04C2cg 4JGHtGwDIci9NkcWiUzA/9FPjtSLHXmL+brI1Tj/Zdd73bWBnfraLSXsYIVsVvjnIjzHFn eDfzFhci348Equ/pu8daQxkojfSVuwOIApZ0UGvQlAkdqT+xgjvSq6LHY+MAjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674764827; 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=Om0KsM1dDbgW0CYm2HGO+iUltLSaGQQczIUyQKbZ2DA=; b=PpPsnBTNaPhcfUUMjhTIFVoG90xjisL0OHe44GEMH1oyPZkE7iJA23dxKGWDKFmBJZ7yVQ W4uZzMtSChTkcWaoEyTXRTs7hOhv2ziCEQL+Ip1xNmKE6S9N7FKMDY5uhQCkDRGpBty4WN jSW9QUW7zjA7K43ksDat/cbayTkQZCX2nri88yCJPJxxabEuX9/0/9tDlCRHujg0obMSpb giFCLTjRSbmq+RBGqPtpuGKLaKeqQg0qRo4l7t64GnPxcACdy0tmtKPJUUyiHi3GM/S1jq sqG+D5tfeg2ZJQ9b41ujiFgxMwutR5Q/x6UKE5kjGgs/k3ARP4uZZOmWU2ZSAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674764827; a=rsa-sha256; cv=none; b=gTREkgBBGLsJKKtDt7CSl1gEUF1bPG1J/qBWPFaBjBjuaH52W945/KHr76CfQi92Mfm4R6 ajPkUoFRzuAeI45c4fqRY+HO9d/R9TsojoHS9hqkjzmAOONLgMuSZ/w1hc5OpmkprJpsaZ lufqV10RpdPjbMPA3JDq4pZHM5PrJoqL83yoHzVyPXOdGUjBiezBPTox9lhRQC0OKZE9bd 3um2autXbcHPJcnkTFXSRGuki1msaETNYRhNQCNf2+f1gTHq3OHN7cNXb8sBRRp1p5h6z3 100EV932o0KfRBqjJHmZc2xk3moduAqzK//lAWrkjhjZHtxiFTtmpuD5+4w/Hw== 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 4P2sgv40kJzjPV; Thu, 26 Jan 2023 20:27:07 +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 30QKR7IC064654; Thu, 26 Jan 2023 20:27:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QKR710064653; Thu, 26 Jan 2023 20:27:07 GMT (envelope-from git) Date: Thu, 26 Jan 2023 20:27:07 GMT Message-Id: <202301262027.30QKR710064653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 79135b4788e2 - stable/13 - 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 79135b4788e2d8dfa1981b01e4ffb22be0c54592 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=79135b4788e2d8dfa1981b01e4ffb22be0c54592 commit 79135b4788e2d8dfa1981b01e4ffb22be0c54592 Author: Mark Johnston AuthorDate: 2022-11-18 19:07:20 +0000 Commit: John Baldwin CommitDate: 2023-01-26 20:07:12 +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 (cherry picked from commit c127c61efa4d8414be9a7373b50c7f348b6e461e) --- 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 57d13d89e271..e002c3724ef0 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; @@ -301,7 +300,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 c4d0d9d26c0d..6f7815c13cf6 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 @@ -43,7 +46,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 { \