All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/5] memcached: upgrade to 1.6.9
@ 2021-06-05  1:30 Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 2/5] indent: Remove dead code using count_parens function Khem Raj
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Khem Raj @ 2021-06-05  1:30 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Fix Set but unused clang warning
sigignore issue is already fixed in 1.6.9

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...01-Replace-sigignore-with-signal-API.patch | 74 -------------------
 ...heck-for-NDEBUG-before-using-total_w.patch | 48 ++++++++++++
 ...{memcached_1.6.6.bb => memcached_1.6.9.bb} |  4 +-
 3 files changed, 50 insertions(+), 76 deletions(-)
 delete mode 100644 meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch
 create mode 100644 meta-networking/recipes-support/memcached/memcached/0002-stats_prefix.c-Check-for-NDEBUG-before-using-total_w.patch
 rename meta-networking/recipes-support/memcached/{memcached_1.6.6.bb => memcached_1.6.9.bb} (91%)

diff --git a/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch b/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch
deleted file mode 100644
index e4aa8fda32..0000000000
--- a/meta-networking/recipes-support/memcached/memcached/0001-Replace-sigignore-with-signal-API.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From b9040acdba1245f8cdf5e94384830e3d04fde98a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 22 Jul 2020 21:32:14 -0700
-Subject: [PATCH] Replace sigignore with signal API
-
-sigignore has been deprecated in glibc 2.32+ [1] and eventually it will be
-removed, therefore substitute it
-
-[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=02802fafcf6e11ea3f998f685035ffe568dfddeb
-
-Upstream-Status: Submitted [https://github.com/memcached/memcached/pull/702]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac |  1 -
- memcached.c  | 16 ++--------------
- 2 files changed, 2 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index ffc98b2..4567b30 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -630,7 +630,6 @@ AC_CHECK_FUNCS(mlockall)
- AC_CHECK_FUNCS(getpagesizes)
- AC_CHECK_FUNCS(sysconf)
- AC_CHECK_FUNCS(memcntl)
--AC_CHECK_FUNCS(sigignore)
- AC_CHECK_FUNCS(clock_gettime)
- AC_CHECK_FUNCS(preadv)
- AC_CHECK_FUNCS(pread)
-diff --git a/memcached.c b/memcached.c
-index 9cb778d..91ced9e 100644
---- a/memcached.c
-+++ b/memcached.c
-@@ -8292,18 +8292,6 @@ static void sig_usrhandler(const int sig) {
-     stop_main_loop = GRACE_STOP;
- }
- 
--#ifndef HAVE_SIGIGNORE
--static int sigignore(int sig) {
--    struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = 0 };
--
--    if (sigemptyset(&sa.sa_mask) == -1 || sigaction(sig, &sa, 0) == -1) {
--        return -1;
--    }
--    return 0;
--}
--#endif
--
--
- /*
-  * On systems that supports multiple page sizes we may reduce the
-  * number of TLB-misses by using the biggest available page size
-@@ -9996,7 +9984,7 @@ int main (int argc, char **argv) {
-     /* daemonize if requested */
-     /* if we want to ensure our ability to dump core, don't chdir to / */
-     if (do_daemonize) {
--        if (sigignore(SIGHUP) == -1) {
-+        if (signal(SIGHUP, SIG_IGN) == SIG_ERR) {
-             perror("Failed to ignore SIGHUP");
-         }
-         if (daemonize(maxcore, settings.verbose) == -1) {
-@@ -10146,7 +10134,7 @@ int main (int argc, char **argv) {
-      * ignore SIGPIPE signals; we can use errno == EPIPE if we
-      * need that information
-      */
--    if (sigignore(SIGPIPE) == -1) {
-+    if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
-         perror("failed to ignore SIGPIPE; sigaction");
-         exit(EX_OSERR);
-     }
--- 
-2.27.0
-
diff --git a/meta-networking/recipes-support/memcached/memcached/0002-stats_prefix.c-Check-for-NDEBUG-before-using-total_w.patch b/meta-networking/recipes-support/memcached/memcached/0002-stats_prefix.c-Check-for-NDEBUG-before-using-total_w.patch
new file mode 100644
index 0000000000..2979552a34
--- /dev/null
+++ b/meta-networking/recipes-support/memcached/memcached/0002-stats_prefix.c-Check-for-NDEBUG-before-using-total_w.patch
@@ -0,0 +1,48 @@
+From d6294e9166e4875a0572349aabcc5e51acbd2e3c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Jun 2021 11:33:12 -0700
+Subject: [PATCH] stats_prefix.c: Check for NDEBUG before using total_written
+ variable
+
+When using NDEBUG assert macro is ineffective which is caught by latest
+clang and reports that total_written is set but unused. Therefore check
+for NDEBUG to make sure assert is used only when its effective
+
+Fixes
+error: variable 'total_written' set but not used [-Werror,-Wunused-but-set-variable]
+    size_t size = 0, written = 0, total_written = 0;
+                                  ^
+Upstream-Status: Submitted [https://github.com/memcached/memcached/pull/792]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ stats_prefix.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/stats_prefix.c b/stats_prefix.c
+index 62f0d04..d72e514 100644
+--- a/stats_prefix.c
++++ b/stats_prefix.c
+@@ -127,8 +127,10 @@ char *stats_prefix_dump(int *length) {
+     PREFIX_STATS *pfs;
+     char *buf;
+     int i, pos;
+-    size_t size = 0, written = 0, total_written = 0;
+-
++    size_t size = 0, written = 0;
++#ifndef NDEBUG
++    size_t total_written = 0;
++#endif
+     /*
+      * Figure out how big the buffer needs to be. This is the sum of the
+      * lengths of the prefixes themselves, plus the size of one copy of
+@@ -154,8 +156,10 @@ char *stats_prefix_dump(int *length) {
+                            pfs->prefix, pfs->num_gets, pfs->num_hits,
+                            pfs->num_sets, pfs->num_deletes);
+             pos += written;
++#ifndef NDEBUG
+             total_written += written;
+             assert(total_written < size);
++#endif
+         }
+     }
+ 
diff --git a/meta-networking/recipes-support/memcached/memcached_1.6.6.bb b/meta-networking/recipes-support/memcached/memcached_1.6.9.bb
similarity index 91%
rename from meta-networking/recipes-support/memcached/memcached_1.6.6.bb
rename to meta-networking/recipes-support/memcached/memcached_1.6.9.bb
index 2eb24db9a8..73e18a4038 100644
--- a/meta-networking/recipes-support/memcached/memcached_1.6.6.bb
+++ b/meta-networking/recipes-support/memcached/memcached_1.6.9.bb
@@ -21,9 +21,9 @@ RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
 
 SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
            file://memcached-add-hugetlbfs-check.patch \
-           file://0001-Replace-sigignore-with-signal-API.patch \
+           file://0002-stats_prefix.c-Check-for-NDEBUG-before-using-total_w.patch \
            "
-SRC_URI[sha256sum] = "908f0eecfa559129c9e44edc46f02e73afe8faca355b4efc5c86d902fc3e32f7"
+SRC_URI[sha256sum] = "d5a62ce377314dbffdb37c4467e7763e3abae376a16171e613cbe69956f092d1"
 
 # set the same COMPATIBLE_HOST as libhugetlbfs
 COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [meta-oe][PATCH 2/5] indent: Remove dead code using count_parens function
  2021-06-05  1:30 [meta-networking][PATCH 1/5] memcached: upgrade to 1.6.9 Khem Raj
@ 2021-06-05  1:30 ` Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 3/5] glm: Fix additional clang warnings Khem Raj
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2021-06-05  1:30 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

clang static analyser finds it as dead code, and it indeed is dead code
so remove it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Remove-dead-paren_level-code.patch   | 79 +++++++++++++++++++
 .../recipes-extended/indent/indent_2.2.12.bb  |  1 +
 2 files changed, 80 insertions(+)
 create mode 100644 meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch

diff --git a/meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch b/meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch
new file mode 100644
index 0000000000..5a474cf0fc
--- /dev/null
+++ b/meta-oe/recipes-extended/indent/indent/0001-Remove-dead-paren_level-code.patch
@@ -0,0 +1,79 @@
+From 5af65ce9674a69054c9a8405e51794c6f3ca41df Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Jun 2021 12:34:18 -0700
+Subject: [PATCH] Remove dead paren_level code
+
+Local variable `paren_level' in src/output.c:dump_line_code() is
+initialized to 0, then incremented with count_parens() return
+value, and then the variable is never used. Also count_parens()
+has no side effect. Thus this patch removes this useless code.
+
+Upstream-Status: Submitted [https://mail.gnu.org/archive/html/bug-indent/2011-04/msg00000.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/output.c | 35 -----------------------------------
+ 1 file changed, 35 deletions(-)
+
+diff --git a/src/output.c b/src/output.c
+index ee01bcc..5b92167 100644
+--- a/src/output.c
++++ b/src/output.c
+@@ -798,37 +798,6 @@ static int dump_line_label(void)
+    return cur_col;
+ }
+ 
+-/**
+- *
+- */
+-
+-static int count_parens(
+-    const char * string)
+-{
+-    int paren_level = 0;
+-
+-    while (*string)
+-    {
+-        switch (*string)
+-        {
+-        case '(':
+-        case '[':
+-            paren_level++;
+-            break;
+-        case ')':
+-        case ']':
+-            paren_level--;
+-            break;
+-        default:
+-            break;
+-        }
+-
+-        string++;
+-    }
+-
+-    return paren_level;
+-}
+-
+ /**
+  *
+  */
+@@ -840,8 +809,6 @@ static void dump_line_code(
+     BOOLEAN * pbreak_line,
+     int       target_col_break)
+ {
+-   int paren_level   = 0;
+-
+    if (s_code != e_code)
+    {                       /* print code section, if any */
+       int i;
+@@ -928,8 +895,6 @@ static void dump_line_code(
+ 
+          *pcur_col = count_columns (*pcur_col, s_code, NULL_CHAR);
+ 
+-         paren_level += count_parens(s_code);
+-
+          s_code[buf_break->offset] = c;
+ 
+          *pnot_truncated = 0;
+-- 
+2.31.1
+
diff --git a/meta-oe/recipes-extended/indent/indent_2.2.12.bb b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
index 90ba8a2e65..829bf0fc1d 100644
--- a/meta-oe/recipes-extended/indent/indent_2.2.12.bb
+++ b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
@@ -16,6 +16,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
            file://0001-src-indent.c-correct-the-check-for-locale.h.patch \
            file://0001-Makefile.am-remove-regression-dir.patch \
            file://0001-Fix-builds-with-recent-gettext.patch \
+           file://0001-Remove-dead-paren_level-code.patch \
            "
 SRC_URI[md5sum] = "4764b6ac98f6654a35da117b8e5e8e14"
 SRC_URI[sha256sum] = "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b"
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [meta-oe][PATCH 3/5] glm: Fix additional clang warnings
  2021-06-05  1:30 [meta-networking][PATCH 1/5] memcached: upgrade to 1.6.9 Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 2/5] indent: Remove dead code using count_parens function Khem Raj
@ 2021-06-05  1:30 ` Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 4/5] tbb: Fix warnings with clang Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 5/5] libwebsockets: Update to latest on v4.2-stable Khem Raj
  3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2021-06-05  1:30 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../glm/glm/0001-Silence-clang-warnings.patch | 131 ++++++++++++++++--
 1 file changed, 123 insertions(+), 8 deletions(-)

diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
index 25e851883e..3a62fffe3a 100644
--- a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
+++ b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
@@ -1,6 +1,6 @@
-From 5b83983b246cff440de4421696b6b5dd9072ed2d Mon Sep 17 00:00:00 2001
+From bd9b5060bc3b9581090d44f15b4e236566ea86a6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 6 Feb 2021 11:36:23 -0800
+Date: Fri, 4 Jun 2021 12:57:57 -0700
 Subject: [PATCH] Silence clang warnings
 
 Fixes
@@ -12,15 +12,22 @@ glm/gtc/../ext/quaternion_common.inl:76:87: error: unused parameter 'k' [-Werror
     GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k)
                                                                                       ^
 
+and
+
+test/gtx/gtx_fast_trigonometry.cpp:135:9: error: variable 'result' set but not used [-Werror,-Wunused-but-set-variable]
+|                 float result = 0.f;
+|                       ^
+
 Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/1055]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- glm/ext/quaternion_common.inl | 2 +-
- glm/gtc/random.inl            | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ glm/ext/quaternion_common.inl      |  2 +-
+ glm/gtc/random.inl                 |  2 +-
+ test/gtx/gtx_fast_trigonometry.cpp | 30 ++++++++++++------------------
+ 3 files changed, 14 insertions(+), 20 deletions(-)
 
 diff --git a/glm/ext/quaternion_common.inl b/glm/ext/quaternion_common.inl
-index 0e4a3bb2..8f9dccef 100644
+index 0e4a3bb2..6f99f52d 100644
 --- a/glm/ext/quaternion_common.inl
 +++ b/glm/ext/quaternion_common.inl
 @@ -104,7 +104,7 @@ namespace glm
@@ -28,7 +35,7 @@ index 0e4a3bb2..8f9dccef 100644
              // Graphics Gems III, page 96
              T angle = acos(cosTheta);
 -            T phi = angle + k * glm::pi<T>();
-+            T phi = angle + static_cast<float>(k) * glm::pi<T>();
++            T phi = angle + static_cast<T>(k) * glm::pi<T>();
              return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle);
          }
      }
@@ -45,6 +52,114 @@ index 70485098..a4af2a06 100644
  		}
  	};
  
+diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp
+index 8bf86ba0..ddaa708b 100644
+--- a/test/gtx/gtx_fast_trigonometry.cpp
++++ b/test/gtx/gtx_fast_trigonometry.cpp
+@@ -19,15 +19,14 @@ namespace fastCos
+ 	{
+ 		const float begin = -glm::pi<float>();
+ 		const float end = glm::pi<float>();
+-		float result = 0.f;
+ 
+ 		const std::clock_t timestamp1 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::fastCos(i);
++			glm::fastCos(i);
+ 
+ 		const std::clock_t timestamp2 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::cos(i);
++			glm::cos(i);
+ 
+ 		const std::clock_t timestamp3 = std::clock();
+ 		const std::clock_t time_fast = timestamp2 - timestamp1;
+@@ -53,15 +52,14 @@ namespace fastSin
+ 	{
+ 		const float begin = -glm::pi<float>();
+ 		const float end = glm::pi<float>();
+-		float result = 0.f;
+ 
+ 		const std::clock_t timestamp1 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::fastSin(i);
++			glm::fastSin(i);
+ 
+ 		const std::clock_t timestamp2 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::sin(i);
++			glm::sin(i);
+ 
+ 		const std::clock_t timestamp3 = std::clock();
+ 		const std::clock_t time_fast = timestamp2 - timestamp1;
+@@ -79,15 +77,14 @@ namespace fastTan
+ 	{
+ 		const float begin = -glm::pi<float>();
+ 		const float end = glm::pi<float>();
+-		float result = 0.f;
+ 
+ 		const std::clock_t timestamp1 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::fastTan(i);
++			glm::fastTan(i);
+ 
+ 		const std::clock_t timestamp2 = std::clock();
+ 		for (float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::tan(i);
++			glm::tan(i);
+ 
+ 		const std::clock_t timestamp3 = std::clock();
+ 		const std::clock_t time_fast = timestamp2 - timestamp1;
+@@ -105,15 +102,14 @@ namespace fastAcos
+ 	{
+ 		const float begin = -glm::pi<float>();
+ 		const float end = glm::pi<float>();
+-		float result = 0.f;
+ 
+ 		const std::clock_t timestamp1 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::fastAcos(i);
++			glm::fastAcos(i);
+ 
+ 		const std::clock_t timestamp2 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::acos(i);
++			glm::acos(i);
+ 
+ 		const std::clock_t timestamp3 = std::clock();
+ 		const std::clock_t time_fast = timestamp2 - timestamp1;
+@@ -132,13 +128,12 @@ namespace fastAsin
+ 	{
+ 		const float begin = -glm::pi<float>();
+ 		const float end = glm::pi<float>();
+-		float result = 0.f;
+ 		const std::clock_t timestamp1 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::fastAsin(i);
++			glm::fastAsin(i);
+ 		const std::clock_t timestamp2 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::asin(i);
++			glm::asin(i);
+ 		const std::clock_t timestamp3 = std::clock();
+ 		const std::clock_t time_fast = timestamp2 - timestamp1;
+ 		const std::clock_t time_default = timestamp3 - timestamp2;
+@@ -155,13 +150,12 @@ namespace fastAtan
+ 	{
+ 		const float begin = -glm::pi<float>();
+ 		const float end = glm::pi<float>();
+-		float result = 0.f;
+ 		const std::clock_t timestamp1 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::fastAtan(i);
++			glm::fastAtan(i);
+ 		const std::clock_t timestamp2 = std::clock();
+ 		for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
+-			result = glm::atan(i);
++			glm::atan(i);
+ 		const std::clock_t timestamp3 = std::clock();
+ 		const std::clock_t time_fast = timestamp2 - timestamp1;
+ 		const std::clock_t time_default = timestamp3 - timestamp2;
 -- 
-2.30.0
+2.31.1
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [meta-oe][PATCH 4/5] tbb: Fix warnings with clang
  2021-06-05  1:30 [meta-networking][PATCH 1/5] memcached: upgrade to 1.6.9 Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 2/5] indent: Remove dead code using count_parens function Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 3/5] glm: Fix additional clang warnings Khem Raj
@ 2021-06-05  1:30 ` Khem Raj
  2021-06-05  1:30 ` [meta-oe][PATCH 5/5] libwebsockets: Update to latest on v4.2-stable Khem Raj
  3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2021-06-05  1:30 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../tbb/tbb/0001-arena-Remove-dead-code.patch | 40 +++++++++++++++++++
 meta-oe/recipes-support/tbb/tbb_2021.2.0.bb   |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch

diff --git a/meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch b/meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch
new file mode 100644
index 0000000000..8a603ffe30
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch
@@ -0,0 +1,40 @@
+From b94a1e3d6b5c733ba24cfa0d35450d8659d48289 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Jun 2021 13:07:28 -0700
+Subject: [PATCH] arena: Remove dead code
+
+Fixes clang warning
+arena.cpp:226:19: error: variable 'drained' set b
+ut not used [-Werror,-Wunused-but-set-variable]
+|     std::intptr_t drained = 0;
+|                   ^
+
+Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/429]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/tbb/arena.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/tbb/arena.cpp b/src/tbb/arena.cpp
+index 4a9c0f8a..c8ed4999 100644
+--- a/src/tbb/arena.cpp
++++ b/src/tbb/arena.cpp
+@@ -232,14 +232,13 @@ void arena::free_arena () {
+     __TBB_ASSERT( !my_global_concurrency_mode, NULL );
+ #endif
+     poison_value( my_guard );
+-    std::intptr_t drained = 0;
+     for ( unsigned i = 0; i < my_num_slots; ++i ) {
+         // __TBB_ASSERT( !my_slots[i].my_scheduler, "arena slot is not empty" );
+         // TODO: understand the assertion and modify
+         // __TBB_ASSERT( my_slots[i].task_pool == EmptyTaskPool, NULL );
+         __TBB_ASSERT( my_slots[i].head == my_slots[i].tail, NULL ); // TODO: replace by is_quiescent_local_task_pool_empty
+         my_slots[i].free_task_pool();
+-        drained += mailbox(i).drain();
++        mailbox(i).drain();
+         my_slots[i].my_default_task_dispatcher->~task_dispatcher();
+     }
+     __TBB_ASSERT(my_fifo_task_stream.empty(), "Not all enqueued tasks were executed");
+-- 
+2.31.1
+
diff --git a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
index f4c52daf41..0b039a181a 100644
--- a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
+++ b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
@@ -19,6 +19,7 @@ SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH
             file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \
             file://0001-Disable-use-of-_tpause-instruction.patch \
             file://0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch \
+            file://0001-arena-Remove-dead-code.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [meta-oe][PATCH 5/5] libwebsockets: Update to latest on v4.2-stable
  2021-06-05  1:30 [meta-networking][PATCH 1/5] memcached: upgrade to 1.6.9 Khem Raj
                   ` (2 preceding siblings ...)
  2021-06-05  1:30 ` [meta-oe][PATCH 4/5] tbb: Fix warnings with clang Khem Raj
@ 2021-06-05  1:30 ` Khem Raj
  3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2021-06-05  1:30 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

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

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+)+)"
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-05  1:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05  1:30 [meta-networking][PATCH 1/5] memcached: upgrade to 1.6.9 Khem Raj
2021-06-05  1:30 ` [meta-oe][PATCH 2/5] indent: Remove dead code using count_parens function Khem Raj
2021-06-05  1:30 ` [meta-oe][PATCH 3/5] glm: Fix additional clang warnings Khem Raj
2021-06-05  1:30 ` [meta-oe][PATCH 4/5] tbb: Fix warnings with clang Khem Raj
2021-06-05  1:30 ` [meta-oe][PATCH 5/5] libwebsockets: Update to latest on v4.2-stable Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.