blob: c6c3c53f19c2e7f502e37244fcf8b50dd9f22b60 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001From 1bd6ff9d10c83afbc9954fc38b953e9167e6d4a9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 28 Aug 2022 14:01:55 -0700
4Subject: [PATCH] reglib: Remove unused variables
5
6These counters are not used anywhere therefore delete them
7Fixes
8reglib.c:1015:15: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
9 unsigned int i = 0;
10 ^
11reglib.c:1062:15: error: variable 'lines' set but not used [-Werror,-Wunused-but-set-variable]
12 unsigned int lines = 0;
13 ^
14
15Upstream-Status: Pending
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 reglib.c | 4 ----
19 1 file changed, 4 deletions(-)
20
21diff --git a/reglib.c b/reglib.c
22index 8565a0b..6c62c2c 100644
23--- a/reglib.c
24+++ b/reglib.c
25@@ -1012,7 +1012,6 @@ static int reglib_find_next_country_stream(FILE *fp)
26 {
27 fpos_t prev_pos;
28 int r;
29- unsigned int i = 0;
30
31 while(1) {
32 char line[1024];
33@@ -1030,7 +1029,6 @@ static int reglib_find_next_country_stream(FILE *fp)
34 line_p = fgets(line, sizeof(line), fp);
35 if (line_p == line) {
36 if (strspn(line, "\n") == strlen(line)) {
37- i++;
38 continue;
39 }
40 if (strncmp(line, "country", 7) != 0)
41@@ -1059,7 +1057,6 @@ struct ieee80211_regdomain *reglib_parse_country(FILE *fp)
42
43 FILE *reglib_create_parse_stream(FILE *f)
44 {
45- unsigned int lines = 0;
46 FILE *fp;
47
48 fp = tmpfile();
49@@ -1076,7 +1073,6 @@ FILE *reglib_create_parse_stream(FILE *f)
50 if (line_p == line) {
51 if (strchr(line, '#') == NULL) {
52 fputs(line, fp);
53- lines++;
54 }
55 continue;
56 } else
57--
582.37.2
59