From nobody Mon Jul 20 20:47:41 2026 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 4h3sz72FCmz6dPTJ for ; Mon, 20 Jul 2026 20:47:47 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h3sz707hZz447m for ; Mon, 20 Jul 2026 20:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784580467; 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=ca/rl6gMF8MkeQVPHe9xt1LmsXeN2MImatzpH8AFdE4=; b=bEbuzTOa/M+2BnOQiW6S021KiBnT/gN/DN8WnBmNSNYo285cLo6Iojau1vX86oW5Uiriic wOaZYzRT/SBFYHdhSkycLKPk/l+vBpjXFbFBpWg3pAwA5abp2vZnnUdj9dCRl/i6KMFm6P YGO98jX6Mq0LvAO+oSE6X5nK52j5IU9Ac6KGS8z1LeZe2XkDEY87Sa4STIzeYoJoDhymqD OOCwgxDEOH2zF8umSmOiUzbicCi+0RhH+tNoUv6x2ZjO3gj+/pJ7CS/bV4vWH4WMRA17pi B00uF5BrlJYDrLRbqMvzU47EbLUuzXMJdHqeBZwKACXY5cq+OdbG+6AxYv9VbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784580467; a=rsa-sha256; cv=none; b=qbUCBCtqTOqZviucXSKenlAP3bSd6Gq+0u4pTqftI88NDGTmRASanZi19IfjIvSwfF9D/N s5sFxJdz0r9vrOtd34xiSMyhE5DSMUVgnPv2gmvuPcKpTiIifKL83tBz5wuXrGKo4ZTO9T ehoLQb3gbYDYfMV8+2kIc7MXd/uxCSIw7eVRApSDj9EF6wh4sROWWsJPrayl1yst4KTOnu Ykq2zU+ov25IJRaK4vJTZxRxt1YAiwqsOYkGg2yNzYM6kGIwqMxOY7nxRU4X+6TrjE+VTr GJ13JqRAt+tpZi5a9XBOavVHgsSXqhOoeJEJwMuMzaCbe07yAJKZHnT4dkALxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784580467; 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=ca/rl6gMF8MkeQVPHe9xt1LmsXeN2MImatzpH8AFdE4=; b=jWte4M+M+S8+C95N802enWtJJ/h6e6i6XJ9PxTV/UAWU6y9dm1enQvoS/5v5HzzTEM446c thFq3ZiNdlNwpEPgnii2+rQCQDSNBv7hXpWFOZxHZ2jLKbdCS1Z902FR3UNY5SKEk4d98r 4oJchwnBxRmjzuB0iksG1nxgXOZapCmyLHK34HZVk2lZfbOY7qgcSvRA4lo6H1Gv1VxtVg JrgqAwrlkgnaNEM6WfsdpzriC8yN1MserjLwT6nzeqjUQpCfuus2YqPCxTpAka2TMDEBY9 kc9QC2kIcrZAu8/lvf88wXTQYv1NqZrTIjBwrADcPK1FNWAecu6V78XQH/4DiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h3sz65YPvz3Gk for ; Mon, 20 Jul 2026 20:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a2c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Jul 2026 20:47:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b273481f2a84 - main - vtfontcvt: Avoid dead store in add_char 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b273481f2a840a05e4039655be99528e1fa9388c Auto-Submitted: auto-generated Date: Mon, 20 Jul 2026 20:47:41 +0000 Message-Id: <6a5e896d.1a2c6.167c3759@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b273481f2a840a05e4039655be99528e1fa9388c commit b273481f2a840a05e4039655be99528e1fa9388c Author: Ed Maste AuthorDate: 2026-05-22 18:08:58 +0000 Commit: Ed Maste CommitDate: 2026-07-20 20:46:50 +0000 vtfontcvt: Avoid dead store in add_char The fallback glyph is stored at index 0, and does not need to be inserted into a mapping. Previously there was a dead store of add_glyph's return value for the fallback case, which upset Clang's static analyzer. Now, cast the return value to (void) to make it clear this is intentional. Also change add_glyph's fallback parameter to a c99 bool to make its use more clear. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57174 --- usr.bin/vtfontcvt/vtfontcvt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/vtfontcvt/vtfontcvt.c b/usr.bin/vtfontcvt/vtfontcvt.c index f39076b09be6..29294f589fb5 100644 --- a/usr.bin/vtfontcvt/vtfontcvt.c +++ b/usr.bin/vtfontcvt/vtfontcvt.c @@ -254,7 +254,7 @@ dedup_mapping(unsigned int map_idx) } static struct glyph * -add_glyph(const uint8_t *bytes, unsigned int map_idx, int fallback) +add_glyph(const uint8_t *bytes, unsigned int map_idx, bool fallback) { struct glyph *gl; int hash; @@ -321,13 +321,13 @@ add_char(unsigned curchar, unsigned map_idx, uint8_t *bytes, uint8_t *bytes_r) /* Prevent adding two glyphs for 0xFFFD */ if (curchar == 0xFFFD) { if (map_idx < VFNT_MAP_BOLD) - gl = add_glyph(bytes, 0, 1); + (void)add_glyph(bytes, 0, true); } else if (filter == false || curchar >= 0x20) { - gl = add_glyph(bytes, map_idx, 0); + gl = add_glyph(bytes, map_idx, false); if (add_mapping(gl, curchar, map_idx) != 0) return (1); if (bytes_r != NULL) { - gl = add_glyph(bytes_r, map_idx + 1, 0); + gl = add_glyph(bytes_r, map_idx + 1, false); if (add_mapping(gl, curchar, map_idx + 1) != 0) return (1); }