[meta-oe,5/5] libwebsockets: Update to latest on v4.2-stable

Submitted by Khem Raj on June 5, 2021, 1:30 a.m. | Patch ID: 179846

Details

Message ID 20210605013005.976154-5-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj June 5, 2021, 1:30 a.m.
Remove unused variable which is flagged by clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...0001-core-net-Remove-unused-variable.patch | 54 +++++++++++++++++++
 .../libwebsockets/libwebsockets_4.2.0.bb      |  6 ++-
 2 files changed, 58 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-core-net-Remove-unused-variable.patch

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-core-net-Remove-unused-variable.patch b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-core-net-Remove-unused-variable.patch
new file mode 100644
index 0000000000..d648c284b5
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-core-net-Remove-unused-variable.patch
@@ -0,0 +1,54 @@ 
+From cfa40cc1c2df6c64fb53bb4a2a56eb09e3e1309c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Jun 2021 18:21:58 -0700
+Subject: [PATCH] core-net: Remove unused variable
+
+variable 'n' is being set but it is not used anywhere, latest clang is
+able to detect this and flags it
+
+Fixes
+
+lib/core-net/route.c:41:6: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable]
+|         int n = 0;
+|             ^
+
+Upstream-Status: Submitted [https://github.com/warmcat/libwebsockets/pull/2320]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/core-net/route.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/lib/core-net/route.c b/lib/core-net/route.c
+index efe08ba1..6be93d62 100644
+--- a/lib/core-net/route.c
++++ b/lib/core-net/route.c
+@@ -38,23 +38,22 @@ void
+ _lws_routing_entry_dump(lws_route_t *rou)
+ {
+ 	char sa[48], fin[192], *end = &fin[sizeof(fin)];
+-	int n = 0;
+ 
+ 	if (rou->dest.sa4.sin_family) {
+ 		lws_sa46_write_numeric_address(&rou->dest, sa, sizeof(sa));
+-		n += lws_snprintf(fin, lws_ptr_diff_size_t(end, fin),
++		lws_snprintf(fin, lws_ptr_diff_size_t(end, fin),
+ 				  "dst: %s/%d, ", sa, rou->dest_len);
+ 	}
+ 
+ 	if (rou->src.sa4.sin_family) {
+ 		lws_sa46_write_numeric_address(&rou->src, sa, sizeof(sa));
+-		n += lws_snprintf(fin, lws_ptr_diff_size_t(end, fin),
++		lws_snprintf(fin, lws_ptr_diff_size_t(end, fin),
+ 				  "src: %s/%d, ", sa, rou->src_len);
+ 	}
+ 
+ 	if (rou->gateway.sa4.sin_family) {
+ 		lws_sa46_write_numeric_address(&rou->gateway, sa, sizeof(sa));
+-		n += lws_snprintf(fin, lws_ptr_diff_size_t(end, fin),
++		lws_snprintf(fin, lws_ptr_diff_size_t(end, fin),
+ 				  "gw: %s, ", sa);
+ 	}
+ 
+-- 
+2.31.1
+
diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.2.0.bb b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.2.0.bb
index 89c98fec02..479106acb0 100644
--- a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.2.0.bb
+++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.2.0.bb
@@ -6,8 +6,10 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=8c47b078124308a4e1354e8d59f606b7"
 DEPENDS = "zlib"
 
 S = "${WORKDIR}/git"
-SRCREV = "1367c11e1ee44d9e19daa50e1d015365bae17354"
-SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.2-stable"
+SRCREV = "4b6a7982b6833c8ccac1f35caaf9e8ccc605ff9a"
+SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.2-stable \
+           file://0001-core-net-Remove-unused-variable.patch \
+          "
 
 UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"