From nobody Fri Jan 2 20:52:08 2026 X-Original-To: dev-commits-src-branches@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 4djbV06Wvbz6MFKp for ; Fri, 02 Jan 2026 20:52:08 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4djbV03dSMz3qNQ for ; Fri, 02 Jan 2026 20:52:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767387128; 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=qgDf4wLDSkkE75NAMmLgaN70i2hMWQ6zYw1RSxnNsxc=; b=H3vs9mprZSegKiaswWDwnelkROjH34/5s1kv0XLaRYNmpN0zep1bGYV6aQ8gN39B4kQEIC wc3nUCuFLCsvB4FnJXSIcMcX/9B0lNvhsQwvEqIuAqvV3K8HgJN1j4qu7/4bQTTTnvPneu gssPfnOjbMYIEClqCD5XMv/AMuHXP2nf6PBFAxOES1RStClbAsVz5+mbM6PILW7Rh+0jUi Z5XdNnYf6OcGXCt3MfcHVRwauMG8OBjnO672nIfz0uzfMOpJIGTMTdp3cPWhomMPGZ++W5 F80L4x6ODMhqhY41m4iQ4mUkT9rB7NK5ZU7o6F39fGHtdYVjf0ZE6bPMWRLyNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767387128; 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=qgDf4wLDSkkE75NAMmLgaN70i2hMWQ6zYw1RSxnNsxc=; b=ddhgy9oqVGX90ZQtzTW9fv/n8W8r8Pd6RBc1UMIWc80SEuWNRVh/csFo2eD6qicOIaJEhS b9BhH/gcFa5Mr9iSVAuyGistATZr4Vpid+bAcHdgEiHHTe//nDmBB4kWWJm6bGvzvGSjDs b3Eju0IfbuxFxYFjMsULGt562eUFhGtQ5AmXIW0ajIVV1+uaHSDKRBBSNVh/cz6H7tnlqk Y5l/Es6bF+FLXat/DaKoeOMa9Wy1D8L41Xwy6wdPTkr2jUI3AjXaEdHhoEGB+/lOfBUI2n sCi/viD6b2fV0w0llILTUS1Yq431MAJf5RxjJSDP7cmNDIMNLhfd2MQJIwOZfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767387128; a=rsa-sha256; cv=none; b=PYtkU38WQyytkb3/gf4y1GuNGm/SC4/UncxYGnRbHFwUj25uLxTIbZMRNHv3EUxNexI2z1 kygiNUN4u1CaRpM0WaFdeHnTz5vf23Fue2pC5perYdU4Sc+3erkPjIcnGllNRv52tLfQK+ OqX7qGf4YkUeOy8PKux1GWEJ4ntc5/M+WQNmG4krpdxkDtQyV42V6YCCuVVKJFKft9JcC+ Ub7jVXulYn6rMNiKtd3lEIqN1Mn5p5jpuNukt3q0QJIavU+kgqYOJLjfcUW3gRqSTe4Dej rtJjwegtC4EkbxiN1BE69GXRdo4bfiINlEhvzLaetsKqB1X4DWpChGTC+XbIlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4djbV02whtzb10 for ; Fri, 02 Jan 2026 20:52:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b6a9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 02 Jan 2026 20:52:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3cd0026966d0 - stable/14 - sh: avoid warnings about too-long initializer strings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3cd0026966d0174c7143ac1d8233ed81ffa68ddf Auto-Submitted: auto-generated Date: Fri, 02 Jan 2026 20:52:08 +0000 Message-Id: <69582ff8.b6a9.770a90c@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3cd0026966d0174c7143ac1d8233ed81ffa68ddf commit 3cd0026966d0174c7143ac1d8233ed81ffa68ddf Author: Dimitry Andric AuthorDate: 2025-12-25 20:13:48 +0000 Commit: Dimitry Andric CommitDate: 2026-01-02 20:44:28 +0000 sh: avoid warnings about too-long initializer strings Mark `optletter` and `t_op::op_text` as `__non_string`, to avoid warnings from clang 21 similar to: bin/sh/options.h:77:36: error: initializer-string for character array is too long, array size is 19 but initializer has size 20 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization] 77 | const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh"; | ^~~~~~~~~~~~~~~~~~~~~ bin/test/test.c:153:3: error: initializer-string for character array is too long, array size is 2 but initializer has size 3 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization] 153 | {"==", STREQ}, | ^~~~ MFC after: 3 days Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D54362 (cherry picked from commit e6546807f4c1a8a6a6fa53fceab7b8c80e3ed802) --- bin/sh/options.h | 2 +- bin/test/test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sh/options.h b/bin/sh/options.h index a477f24e90ca..526383b5bc1c 100644 --- a/bin/sh/options.h +++ b/bin/sh/options.h @@ -76,7 +76,7 @@ extern char optval[NOPTS]; extern const char optletter[NSHORTOPTS]; #ifdef DEFINE_OPTIONS char optval[NOPTS]; -const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh"; +const char optletter[NSHORTOPTS] __nonstring = "efIimnsxvVECabupTPh"; static const unsigned char optname[] = "\007errexit" "\006noglob" diff --git a/bin/test/test.c b/bin/test/test.c index 1cb3eca8fe13..b8f6845c221f 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -117,7 +117,7 @@ enum token { #define TOKEN_TYPE(token) ((token) & 0xff00) static const struct t_op { - char op_text[2]; + char op_text[2] __nonstring; short op_num; } ops1[] = { {"=", STREQ},