From nobody Wed May 04 14:10:48 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 2DB8F1AC01D6; Wed, 4 May 2022 14:10:49 +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 4Ktdyx05fPz3PK8; Wed, 4 May 2022 14:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651673449; 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=2U0WGuynzFZ9qDjWXD8yZ7EZjaL/bA9P+aolTiffIE4=; b=O3Z+LhCW4WZfQZrOm2zF2cWGRTpa9iey6gmQcjgJt7MmrWueUil4P+sr3b7tr6+gZDZIJh 4fRsqOzzFn8ObvIfgBx+KrI/+YAk0GHlDzbdlWuf87epQK9hnDT+LcqV58NdUB58jIelnS dSw2D6xYKcQ3dez+MCCmWaisAyNEZj14l0oSj8HRC079/fw64W2rayCfl+dimUs1+pRM5j SbazHB2mj53S7/U/DMFkYVOBBiyDQ2C6AxlftroV0VekAl3BemJI5k61QSyZfrG10RLzA1 3aXulB9wLaRTwPwJF0qkpEiuf2LSv6hcXu00qYOB7BrCPn4AGUCJNHJc9wHfTg== 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 B43A51433F; Wed, 4 May 2022 14:10:48 +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 244EAmEA034569; Wed, 4 May 2022 14:10:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 244EAm7c034568; Wed, 4 May 2022 14:10:48 GMT (envelope-from git) Date: Wed, 4 May 2022 14:10:48 GMT Message-Id: <202205041410.244EAm7c034568@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: 8d20f1560d05 - main - stand/zfs: Fix const-qual 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: 8d20f1560d05ef4c96680cd1a0a0b9ac9054700f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651673449; 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=2U0WGuynzFZ9qDjWXD8yZ7EZjaL/bA9P+aolTiffIE4=; b=xhMT1FroPlmFxeuTriu64snwrThBKmo3EyDb+YsyoJSDWbzM4lfuwaDjQe7hWOSfrcCj/r U3cgd+2BP0tahVbBwPVVqNXWEE9qFYYMF0333Je1WbsuMk6GD9g6sfZzGFwrdtVxxz01Au 0zBoSTZJSRNLpv0T7+KkM9VfW0993/M3yPFu+gLU63Xe0ITaNnqOdW2qEN6RszN2ecsL1J B4vARqacgQVVNceHMvMNJKqixmzCFBtW8eck6miB2+aP+jPFEXtDiVtU/Ur1X9I8mkMhGW XE3t0n+hrtf4sPK3t+mef/wiym2ulf/dyqRTzSa4lhlBI4Gt+XlHKNqFJDQmJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651673449; a=rsa-sha256; cv=none; b=XTX9tH4D2S9AzlA6xnGF9gh38obD3vXoTLlBAGcA4PtScEY6/6xF6+CNgpVIdDWdMj3dRl jrpt7gimEYB6zEUNwvoIG50V24Qtc5nDTdtfoqJcBiSBgCLLp4pm3CmKSyklVZOIQ9K0be lMNye3zy5IvE0JiLmjDYd7BsfKt51D+4TeTDE4V5I6UZOI03N8qydpsO/iXopf7h94OoPv KzuaznKBnk6fWiNG4YWoD+M+WaSzYBj3vZ8c3GczKqpWuO4sEAhnIWAQQLOlSnmUSVokeK zMYmpPrWXhAzo3SPUDyHuLKVhFGpichEj3gc8lctppzIKZ0yuRFTpyd/PFi4PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8d20f1560d05ef4c96680cd1a0a0b9ac9054700f commit 8d20f1560d05ef4c96680cd1a0a0b9ac9054700f Author: Mark Johnston AuthorDate: 2022-04-29 13:19:34 +0000 Commit: Mark Johnston CommitDate: 2022-05-04 14:06:21 +0000 stand/zfs: Fix const-qual warnings The input buffer is read-only, update casts to match. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/cddl/boot/zfs/sha256.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/cddl/boot/zfs/sha256.c b/sys/cddl/boot/zfs/sha256.c index eee98e612a1e..2e1bfca0274f 100644 --- a/sys/cddl/boot/zfs/sha256.c +++ b/sys/cddl/boot/zfs/sha256.c @@ -203,11 +203,11 @@ SHA256(uint32_t *H, const void *buf, uint64_t size, zio_cksum_t *zcp) /* process all blocks up to the last one */ for (i = 0; i < size - padsize; i += 64) - SHA256Transform(H, (uint8_t *)buf + i); + SHA256Transform(H, (const uint8_t *)buf + i); /* process the last block and padding */ for (k = 0; k < padsize; k++) - pad[k] = ((uint8_t *)buf)[k+i]; + pad[k] = ((const uint8_t *)buf)[k + i]; for (pad[padsize++] = 0x80; (padsize & 63) != 56; padsize++) pad[padsize] = 0; @@ -259,11 +259,11 @@ SHA512(uint64_t *H, const void *buf, uint64_t size, zio_cksum_t *zcp) /* process all blocks up to the last one */ for (i = 0; i < size - padsize; i += 128) - SHA512Transform(H, (uint8_t *)buf + i); + SHA512Transform(H, (const uint8_t *)buf + i); /* process the last block and padding */ for (k = 0; k < padsize; k++) - pad[k] = ((uint8_t *)buf)[k+i]; + pad[k] = ((const uint8_t *)buf)[k + i]; if (padsize < 112) { for (pad[padsize++] = 0x80; padsize < 112; padsize++)