mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-14 22:35:25 +01:00
crda: Fix build with clang-15
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
dd8ceca71e
commit
05f9c6f1ba
|
|
@ -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
|
||||
|
||||
|
|
@ -16,6 +16,7 @@ SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
|
|||
file://fix-issues-when-USE_OPENSSL-1.patch \
|
||||
file://crda-4.14-python-3.patch \
|
||||
file://0001-Make-alpha2-to-be-3-characters-long.patch \
|
||||
file://0001-reglib-Remove-unused-variables.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a"
|
||||
SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user