diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-22 23:50:19 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-08-23 09:55:28 -0700 |
commit | 8cb8931757214d63c9140cdba83ee5dfc968bc28 (patch) | |
tree | 3c5009ac317c943c37150a1d8fd6ef77fa307eac /meta-oe/recipes-core/safec | |
parent | ff62a99e18c7d755546f38a883d3821694355495 (diff) | |
download | meta-openembedded-8cb8931757214d63c9140cdba83ee5dfc968bc28.tar.gz |
safec: Remove unused variable 'len'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core/safec')
-rw-r--r-- | meta-oe/recipes-core/safec/safec/0001-strpbrk_s-Remove-unused-variable-len.patch | 42 | ||||
-rw-r--r-- | meta-oe/recipes-core/safec/safec_3.7.1.bb | 3 |
2 files changed, 44 insertions, 1 deletions
diff --git a/meta-oe/recipes-core/safec/safec/0001-strpbrk_s-Remove-unused-variable-len.patch b/meta-oe/recipes-core/safec/safec/0001-strpbrk_s-Remove-unused-variable-len.patch new file mode 100644 index 0000000000..4fd36ab8ab --- /dev/null +++ b/meta-oe/recipes-core/safec/safec/0001-strpbrk_s-Remove-unused-variable-len.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From b1d7cc6495c541cdd99399b4d1a835997376dcbf Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 22 Aug 2022 23:42:33 -0700 | ||
4 | Subject: [PATCH] strpbrk_s: Remove unused variable len | ||
5 | |||
6 | Fixes | ||
7 | error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable] | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/rurban/safeclib/pull/123] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/extstr/strpbrk_s.c | 3 --- | ||
13 | 1 file changed, 3 deletions(-) | ||
14 | |||
15 | diff --git a/src/extstr/strpbrk_s.c b/src/extstr/strpbrk_s.c | ||
16 | index 5bb7a0f8..2cf8a8be 100644 | ||
17 | --- a/src/extstr/strpbrk_s.c | ||
18 | +++ b/src/extstr/strpbrk_s.c | ||
19 | @@ -79,7 +79,6 @@ EXPORT errno_t _strpbrk_s_chk(char *dest, rsize_t dmax, char *src, rsize_t slen, | ||
20 | #endif | ||
21 | { | ||
22 | char *ps; | ||
23 | - rsize_t len; | ||
24 | |||
25 | CHK_SRC_NULL("strpbrk_s", firstp) | ||
26 | *firstp = NULL; | ||
27 | @@ -121,7 +120,6 @@ EXPORT errno_t _strpbrk_s_chk(char *dest, rsize_t dmax, char *src, rsize_t slen, | ||
28 | while (*dest && dmax) { | ||
29 | |||
30 | ps = src; | ||
31 | - len = slen; | ||
32 | while (*ps) { | ||
33 | |||
34 | /* check for a match with the substring */ | ||
35 | @@ -130,7 +128,6 @@ EXPORT errno_t _strpbrk_s_chk(char *dest, rsize_t dmax, char *src, rsize_t slen, | ||
36 | return RCNEGATE(EOK); | ||
37 | } | ||
38 | ps++; | ||
39 | - len--; | ||
40 | } | ||
41 | dest++; | ||
42 | dmax--; | ||
diff --git a/meta-oe/recipes-core/safec/safec_3.7.1.bb b/meta-oe/recipes-core/safec/safec_3.7.1.bb index 5ffe7d7528..9dd6f1c7cc 100644 --- a/meta-oe/recipes-core/safec/safec_3.7.1.bb +++ b/meta-oe/recipes-core/safec/safec_3.7.1.bb | |||
@@ -9,7 +9,8 @@ inherit autotools pkgconfig | |||
9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
10 | SRCREV = "f9add9245b97c7bda6e28cceb0ee37fb7e254fd8" | 10 | SRCREV = "f9add9245b97c7bda6e28cceb0ee37fb7e254fd8" |
11 | SRC_URI = "git://github.com/rurban/safeclib.git;branch=master;protocol=https \ | 11 | SRC_URI = "git://github.com/rurban/safeclib.git;branch=master;protocol=https \ |
12 | " | 12 | file://0001-strpbrk_s-Remove-unused-variable-len.patch \ |
13 | " | ||
13 | 14 | ||
14 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64|mips).*-linux' | 15 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64|mips).*-linux' |
15 | 16 | ||