aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/dynamic-layers/meta-python/recipes-connectivity/crda/crda/0001-reglib-Remove-unused-variables.patch
blob: c6c3c53f19c2e7f502e37244fcf8b50dd9f22b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From 1bd6ff9d10c83afbc9954fc38b953e9167e6d4a9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 28 Aug 2022 14:01:55 -0700
Subject: [PATCH] reglib: Remove unused variables

These counters are not used anywhere therefore delete them
Fixes
reglib.c:1015:15: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
        unsigned int i = 0;
                     ^
reglib.c:1062:15: error: variable 'lines' set but not used [-Werror,-Wunused-but-set-variable]
        unsigned int lines = 0;
                     ^

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 reglib.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/reglib.c b/reglib.c
index 8565a0b..6c62c2c 100644
--- a/reglib.c
+++ b/reglib.c
@@ -1012,7 +1012,6 @@ static int reglib_find_next_country_stream(FILE *fp)
 {
 	fpos_t prev_pos;
 	int r;
-	unsigned int i = 0;
 
 	while(1) {
 		char line[1024];
@@ -1030,7 +1029,6 @@ static int reglib_find_next_country_stream(FILE *fp)
 		line_p = fgets(line, sizeof(line), fp);
 		if (line_p == line) {
 			if (strspn(line, "\n") == strlen(line)) {
-				i++;
 				continue;
 			}
 			if (strncmp(line, "country", 7) != 0)
@@ -1059,7 +1057,6 @@ struct ieee80211_regdomain *reglib_parse_country(FILE *fp)
 
 FILE *reglib_create_parse_stream(FILE *f)
 {
-	unsigned int lines = 0;
 	FILE *fp;
 
 	fp = tmpfile();
@@ -1076,7 +1073,6 @@ FILE *reglib_create_parse_stream(FILE *f)
 		if (line_p == line) {
 			if (strchr(line, '#') == NULL) {
 				fputs(line, fp);
-				lines++;
 			}
 			continue;
 		} else
-- 
2.37.2