From nobody Thu May 1 18:06:34 2025 X-Original-To: dev-commits-src-main@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 4ZpMSV4J1Kz5vWYQ; Thu, 01 May 2025 18:06:34 +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 4ZpMSV3bwNz49wm; Thu, 01 May 2025 18:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746122794; 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=gPT/tfij7ZL5ieuWCdnqIa3liIvtBgjnGTMzWSvD8Io=; b=MhldbRwjgORfucl/Jrd8CXXcFY3zux3d/ay5rfeW7tqMykfjbGDpikBX1mYmMtqzmPszc6 cegIZTqZw5X18Q4NK2IwsPOWjepb14A/vzlnXrScc00wi5zyO8a4hOe6gX96QIH0oWE0JG pXor5bNH09BKbObzi7ZHiJ8y6boWqpNq4u/Z6dY6aW0KRAXQG/7qexzPLiP9DZG+6w1uxf z7x2vtxJeZ1bkwehw6cwBl2TCID42XvP60PRPKMXJXSDbuEaTiObeAW6q2ply7z4awhUUl US5WxP3b0Qb99zb8o6e+TIhwJzk9ARP2cVfm8g6vWnid9OtDQnbDAngKrBbd2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746122794; 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=gPT/tfij7ZL5ieuWCdnqIa3liIvtBgjnGTMzWSvD8Io=; b=qKcoqvwSwIrXb0D/tU9n9ldrXMyJSG19cByzlpSZMTn5x9z6xFX7z27QKlRbX6Gw/h69qV fjIkF6Kq8DWbsCE90Tfejcy19ObNKf0u+ayi+i/VEw2TOOcBf9DuBZ6T66eDWh8XkcbvCa u4Jlq8K2seBPA0mizb/7uRp56phfS0IuSWouzUJ86Mbplmp0Vxmj8lOXFQh+uU/ijf9Voa YjmvSA9jbPd1OF2Py424Fatdtrvhdp7j7hrQQdIebbkT3q0rVCDBmJdgxeIDAsky1wrRxh jfMXhQrFEx7D53G+F5mrl+YY890SnXDPT0r5ZeeqFXWvwXWJ1zL4BMg8lw+T+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746122794; a=rsa-sha256; cv=none; b=wYeIE+jRb8HZdejQ9Q77/5rteU/OYjEc96uC+lnnuoCqIYmLcxPzXiADnqcK+bDhyvm8Bz nC2YooaFzTYHc2qJxg73HChXjKEeDnRoMJYjxX7u/bWXGZSAyCf8cgz0o7i1DbvuTqyMwj HOuybtZ+gP/S6fXJ3RqMiSL9RV0tL3FYaEveXXVInwI8yAwFNdndEf0EqtyxMJI8mJA6Vl Pjyp3XzAIKTsiMgfjgkadsB4fFp9u4E5SQT2gCwPuHhY4wo6gN2uXNEqlrrCkxhhA9uu4k q7tq5CQJRa3VSnlFDdm8hoZ6qwmg0HpdeA3iCWUIzy7sNc+LLEv9MBPlcziGxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZpMSV2mJVzfk7; Thu, 01 May 2025 18:06:34 +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 541I6Y4j066422; Thu, 1 May 2025 18:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 541I6YO6066419; Thu, 1 May 2025 18:06:34 GMT (envelope-from git) Date: Thu, 1 May 2025 18:06:34 GMT Message-Id: <202505011806.541I6YO6066419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cdfaf4e984a4 - main - efivar: Add some explicit casts to uuid_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cdfaf4e984a40326a2559d3348f187a350aac0f8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cdfaf4e984a40326a2559d3348f187a350aac0f8 commit cdfaf4e984a40326a2559d3348f187a350aac0f8 Author: Warner Losh AuthorDate: 2025-05-01 17:52:54 +0000 Commit: Warner Losh CommitDate: 2025-05-01 17:52:54 +0000 efivar: Add some explicit casts to uuid_t Since we know we're type-punning the EFI_GUID to a uuid_t, add some explicit casts even though, at the moment, we typedef one to the other. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D50032 --- lib/libefivar/efivar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libefivar/efivar.c b/lib/libefivar/efivar.c index 468e1d31f903..bb838e8a1399 100644 --- a/lib/libefivar/efivar.c +++ b/lib/libefivar/efivar.c @@ -89,7 +89,7 @@ efi_guid_tbl_compile(void) if (done) return; for (i = 0; i < nitems(guid_tbl); i++) { - uuid_from_string(guid_tbl[i].uuid_str, &guid_tbl[i].guid, + uuid_from_string(guid_tbl[i].uuid_str, (uuid_t *)&guid_tbl[i].guid, &status); /* all f's is a bad version, so ignore that error */ if (status != uuid_s_ok && status != uuid_s_bad_version) @@ -289,7 +289,7 @@ efi_guid_cmp(const efi_guid_t *guid1, const efi_guid_t *guid2) { uint32_t status; - return uuid_compare(guid1, guid2, &status); + return uuid_compare((const uuid_t *)guid1, (const uuid_t *)guid2, &status); } int @@ -297,7 +297,7 @@ efi_guid_is_zero(const efi_guid_t *guid) { uint32_t status; - return uuid_is_nil(guid, &status); + return uuid_is_nil((const uuid_t *)guid, &status); } int @@ -308,7 +308,7 @@ efi_guid_to_name(efi_guid_t *guid, char **name) efi_guid_tbl_compile(); for (i = 0; i < nitems(guid_tbl); i++) { - if (uuid_equal(guid, &guid_tbl[i].guid, &status)) { + if (uuid_equal((const uuid_t *)guid, (const uuid_t *)&guid_tbl[i].guid, &status)) { *name = strdup(guid_tbl[i].name); return (0); } @@ -333,7 +333,7 @@ efi_guid_to_str(const efi_guid_t *guid, char **sp) uint32_t status; /* knows efi_guid_t is a typedef of uuid_t */ - uuid_to_string(guid, sp, &status); + uuid_to_string((const uuid_t *)guid, sp, &status); return (status == uuid_s_ok ? 0 : -1); } @@ -384,7 +384,7 @@ efi_str_to_guid(const char *s, efi_guid_t *guid) uint32_t status; /* knows efi_guid_t is a typedef of uuid_t */ - uuid_from_string(s, guid, &status); + uuid_from_string(s, (uuid_t *)guid, &status); return (status == uuid_s_ok ? 0 : -1); }