git: 54523452030a - stable/14 - tools/wlanstats: fix -Wunused-but-set-variable

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Wed, 04 Oct 2023 15:23:37 UTC
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=54523452030a7490b93b7cee2b827886becd8960

commit 54523452030a7490b93b7cee2b827886becd8960
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-09-11 14:11:52 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-10-04 15:19:17 +0000

    tools/wlanstats: fix -Wunused-but-set-variable
    
    The "allnodes" code is currently #if 0 so also #if 0 the setting of the
    command line option and variable in order to keep wlanstats compiling.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 530c13c5401c1f29f8325cf851d96778852a1ba3)
---
 tools/tools/net80211/wlanstats/main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/tools/net80211/wlanstats/main.c b/tools/tools/net80211/wlanstats/main.c
index 4c0cf4db0505..ac100a70622e 100644
--- a/tools/tools/net80211/wlanstats/main.c
+++ b/tools/tools/net80211/wlanstats/main.c
@@ -168,18 +168,26 @@ main(int argc, char *argv[])
 	struct ether_addr *ea;
 	const uint8_t *mac = NULL;
 	const char *ifname;
+#if 0
 	int allnodes = 0;
+#endif
 	int c, mode;
 
 	ifname = getenv("WLAN");
 	if (ifname == NULL)
 		ifname = "wlan0";
 	wf = wlanstats_new(ifname, getfmt("default"));
+#if 0
 	while ((c = getopt(argc, argv, "ahi:lm:o:")) != -1) {
+#else
+	while ((c = getopt(argc, argv, "hi:lm:o:")) != -1) {
+#endif
 		switch (c) {
+#if 0
 		case 'a':
 			allnodes++;
 			break;
+#endif
 		case 'h':
 			usage();
 			exit(0);