diff options
-rw-r--r-- | meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch | 48 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb (renamed from meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.2.bb) | 3 |
2 files changed, 1 insertions, 50 deletions
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch deleted file mode 100644 index c71f01299..000000000 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 7bdaa32c80bb7d37668c1ff6d88bb02428459a0f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 21 Oct 2020 09:11:20 -0700 | ||
4 | Subject: [PATCH] libopeniscsiusr: Compare with max int instead of max long | ||
5 | |||
6 | This compares value member of int_list_tbl struct which is of unsigned | ||
7 | int type. | ||
8 | |||
9 | struct int_list_tbl { | ||
10 | const char *name; | ||
11 | unsigned int value; | ||
12 | }; | ||
13 | |||
14 | Clang compiler reports this comparison when | ||
15 | -Wtautological-constant-out-of-range-compare is enabled | ||
16 | |||
17 | | idbm.c:1042:2: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always true [-Werror,-Wtautological-constant-out-of-range-compare] | ||
18 | | _rec_int_list(SESSION_CHAP_ALGS, recs, node, session.auth.chap_algs, | ||
19 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
20 | | idbm.c:263:23: note: expanded from macro '_rec_int_list' | ||
21 | | if (_org->_name[_i] != ~0UL) { \ | ||
22 | | ~~~~~~~~~~~~~~~ ^ ~~~~ | ||
23 | |||
24 | Since max value for int can be less than unsinged long e.g. on LP64 its | ||
25 | better to use UINT_MAX here | ||
26 | |||
27 | Upstream-Status: Submitted [https://github.com/open-iscsi/open-iscsi/pull/227] | ||
28 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
29 | --- | ||
30 | libopeniscsiusr/idbm.c | 2 +- | ||
31 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
32 | |||
33 | diff --git a/libopeniscsiusr/idbm.c b/libopeniscsiusr/idbm.c | ||
34 | index 7bc2381..060196f 100644 | ||
35 | --- a/libopeniscsiusr/idbm.c | ||
36 | +++ b/libopeniscsiusr/idbm.c | ||
37 | @@ -260,7 +260,7 @@ do {\ | ||
38 | _recs[_n].type = TYPE_INT_LIST; \ | ||
39 | _strncpy(_recs[_n].name, _key, NAME_MAXVAL); \ | ||
40 | for (unsigned int _i = 0; _i < ARRAY_LEN(_org->_name); _i++) { \ | ||
41 | - if (_org->_name[_i] != ~0UL) { \ | ||
42 | + if (_org->_name[_i] != UINT_MAX) { \ | ||
43 | for (unsigned int _j = 0; _j < ARRAY_LEN(_tbl); _j++) { \ | ||
44 | if (_tbl[_j].value == _org->_name[_i]) { \ | ||
45 | strcat(_recs[_n].value, _tbl[_j].name); \ | ||
46 | -- | ||
47 | 2.29.0 | ||
48 | |||
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.2.bb b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb index dfcd4ee3c..4a9cf9db4 100644 --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.2.bb +++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb | |||
@@ -12,11 +12,10 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d) | |||
12 | 12 | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
14 | 14 | ||
15 | SRCREV ?= "802688debcd88c48edabe86deb7e7ed47ebadc26" | 15 | SRCREV ?= "34e3ffb194f6fa3028c0eb2ff57e7db2d1026771" |
16 | 16 | ||
17 | SRC_URI = "git://github.com/open-iscsi/open-iscsi \ | 17 | SRC_URI = "git://github.com/open-iscsi/open-iscsi \ |
18 | file://0001-Makefile-Do-not-set-Werror.patch \ | 18 | file://0001-Makefile-Do-not-set-Werror.patch \ |
19 | file://0001-libopeniscsiusr-Compare-with-max-int-instead-of-max-.patch \ | ||
20 | file://initd.debian \ | 19 | file://initd.debian \ |
21 | file://99_iscsi-initiator-utils \ | 20 | file://99_iscsi-initiator-utils \ |
22 | file://iscsi-initiator \ | 21 | file://iscsi-initiator \ |