[oe] [meta-networking][PATCH 2/5] kronoset: Disable sign-compare with clang

Khem Raj raj.khem at gmail.com
Mon Mar 9 19:37:09 UTC 2020


clang isn't suppressing warnings from system headers like it should
Fixes
../../git/libknet/transport_udp.c:326:48: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]
                for (cmsg = CMSG_FIRSTHDR(&msg);cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
                                                             ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../recipes-extended/kronosnet/kronosnet_1.15.bb            | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-networking/recipes-extended/kronosnet/kronosnet_1.15.bb b/meta-networking/recipes-extended/kronosnet/kronosnet_1.15.bb
index 24aa27a87b..6bf268da9d 100644
--- a/meta-networking/recipes-extended/kronosnet/kronosnet_1.15.bb
+++ b/meta-networking/recipes-extended/kronosnet/kronosnet_1.15.bb
@@ -15,3 +15,9 @@ SRC_URI = "git://github.com/kronosnet/kronosnet;protocol=https;branch=stable1"
 inherit autotools
 
 S = "${WORKDIR}/git"
+
+# libknet/transport_udp.c:326:48: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]
+# for (cmsg = CMSG_FIRSTHDR(&msg);cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+#                                                             ^~~~~~~~~~~~~~~~~~~~~~~
+CFLAGS_append_toolchain-clang = " -Wno-sign-compare"
+
-- 
2.25.1



More information about the Openembedded-devel mailing list