diff options
Diffstat (limited to 'meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/crda/crda/0001-reglib-Remove-unused-variables.patch')
-rw-r--r-- | meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/crda/crda/0001-reglib-Remove-unused-variables.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/crda/crda/0001-reglib-Remove-unused-variables.patch b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/crda/crda/0001-reglib-Remove-unused-variables.patch new file mode 100644 index 0000000000..c6c3c53f19 --- /dev/null +++ b/meta-openembedded/meta-networking/dynamic-layers/meta-python/recipes-connectivity/crda/crda/0001-reglib-Remove-unused-variables.patch @@ -0,0 +1,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 + |