From nobody Mon Apr 28 17:07:34 2025 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 4ZmVHq3CCZz5tc4t; Mon, 28 Apr 2025 17:07:35 +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 4ZmVHp4R22z3q9D; Mon, 28 Apr 2025 17:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745860054; 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=LhDpDZEyLJF28AJRBkYdVTUhlSPaD+AluV+9VmGUmz8=; b=XrI0C0QoQj5fEelDYMXDUSzuEen/8cOdnsgOGlYs1fBfFJ64ibopa4KgJAZUK+EyWt6svp IqCFwwJbiJzm5TXRW9bvSOAHa3UFmvmXJIYyIsRIJW9+c+MVNH6sLcF7vFHQSnWhCEjo46 PekNjMLQkKpPiURxr5Qy1lJWf7GQXmEjLr/w0SvdS0MMAgc9IAQvyYKJ94Fou9WSJKA2sQ gf+J1mJ5g3msU/h62cDKnWbFmBNyE3e69TY/MYw6grSHlCUQLPjn1kLKq+QY7KUv7T2bPq h5vbX6VZQyxGgSahWb2pAgiyBRcsy3as3HDsdwb9kuMHG9vFCVjvsQhUVvhppQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745860054; a=rsa-sha256; cv=none; b=fmqcXwbiHGVceX0OyjfIOcQaT+RUJsqTcY7H43N7K79ScS/L0jALO6JiIUNZZE9TVJJFkk nvDq59N3dLC+5NgNZT3mm1gP8iMBNdm0k0zeL+p20MR7CwcwLidC2KSfbnz2Ggvn5td6UI ZZ/KMG54z2+iSxjo0x5ZLXbeHIIF5TE7FIpErbBQW3bM0aeQa/wtPUEd8cE6dsPBteptjy qlk3zO4Mcf6WQ85AsXTPNUVROYyyu9lYkRDoaqWj9DgvCH9Z5cLhvv/Q2XfpQ3Z2r+gI4q /LdfjkT4zMK0VKW8qrbEfH1mg1gbfFk1LtybDI2NokQLD75owlJZoA5j2Eg/Gw== 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=1745860054; 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=LhDpDZEyLJF28AJRBkYdVTUhlSPaD+AluV+9VmGUmz8=; b=MtZLbQqjRZHyTOud6IQtLwyeGvCZH31hORSJ3NM1k3hEtrRtwJ7Rrz6Ad9i/3sXy4iPkdL ADSSLVe/6DImjSvUCK1dlol8HNNfv0pV96rP67ToBbicPUOKvFnCuj3MAxldXvwK+Mt45j HVSjkeeLh2dALa+MFN7Q3hYa2SlELKGISKsMp8jLkizq8O74McFLT9fPJNd1Ky3VOMB7xy XFVqoMC9eWhnFHe+89SDP1L1JKCuMfX5UI3e14BDisBoskC2VY0RS3A9INjHL0lhN4wBRn kAJ4x9iSG3bRvknDW4jC+LsDc9pj6Sw6/istd8B42WtRPMy96KYhHIA+oObZEw== 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 4ZmVHp41pkzkmL; Mon, 28 Apr 2025 17:07: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 53SH7YJX052749; Mon, 28 Apr 2025 17:07:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53SH7Yro052746; Mon, 28 Apr 2025 17:07:34 GMT (envelope-from git) Date: Mon, 28 Apr 2025 17:07:34 GMT Message-Id: <202504281707.53SH7Yro052746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ac3110dc9ec0 - main - : Conditionally export table of bit names 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 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/main X-Git-Reftype: branch X-Git-Commit: ac3110dc9ec06a9a1fb928902ac2ba742747be15 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ac3110dc9ec06a9a1fb928902ac2ba742747be15 commit ac3110dc9ec06a9a1fb928902ac2ba742747be15 Author: John Baldwin AuthorDate: 2025-04-28 17:05:38 +0000 Commit: John Baldwin CommitDate: 2025-04-28 17:05:38 +0000 : Conditionally export table of bit names Only export the array of string names if _WANT_IFCAP_BIT_NAMES is defined. Exporting them unconditionally can trigger unused variable warnings if a consumer doesn't use the array. Reviewed by: olce, bz, brooks Differential Revision: https://reviews.freebsd.org/D49954 --- sbin/ifconfig/ifconfig_netlink.c | 2 ++ sys/net/if_strings.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sbin/ifconfig/ifconfig_netlink.c b/sbin/ifconfig/ifconfig_netlink.c index 5a986e840d7f..c1e6b7be587f 100644 --- a/sbin/ifconfig/ifconfig_netlink.c +++ b/sbin/ifconfig/ifconfig_netlink.c @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +#define _WANT_IFCAP_BIT_NAMES + #include #include #include diff --git a/sys/net/if_strings.h b/sys/net/if_strings.h index a127fa273a8b..a40debd30ed5 100644 --- a/sys/net/if_strings.h +++ b/sys/net/if_strings.h @@ -66,6 +66,7 @@ #define IFCAP2_RXTLS6_NAME IFCAP_RXTLS6_NAME #define IFCAP2_IPSEC_OFFLOAD_NAME IFCAP_IPSEC_OFFLOAD_NAME +#ifdef _WANT_IFCAP_BIT_NAMES static const char *ifcap_bit_names[] = { IFCAP_RXCSUM_NAME, IFCAP_TXCSUM_NAME, @@ -108,5 +109,6 @@ static const char *ifcap_bit_names[] = { _Static_assert(sizeof(ifcap_bit_names) >= IFCAP_B_SIZE * sizeof(char *), "ifcap bit names missing from ifcap_bit_names"); #endif +#endif #endif