All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/2] openhpi: Fix ptest compile failures due to narrowing warnings with clang
@ 2017-08-28  5:38 Khem Raj
  2017-08-28  5:38 ` [meta-networking][PATCH V2 2/2] squid: Disable format-truncation warning only with gcc Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2017-08-28  5:38 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../openhpi/files/fix-narrowing-warning.patch        | 20 ++++++++++++++++++++
 .../recipes-daemons/openhpi/openhpi_3.6.1.bb         |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch

diff --git a/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch b/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch
new file mode 100644
index 000000000..4c545708f
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch
@@ -0,0 +1,20 @@
+Fix
+
+sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
+((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
+===================================================================
+--- openhpi-3.6.1.orig/plugins/ipmidirect/t/sensor_factors_000.cpp
++++ openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
+@@ -63,7 +63,7 @@ static cIpmiSdr sdr =
+     dB & 0xff,
+     ((dB >> 2) & 0xc0) | (dAccuracy & 0x3f),
+     ((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c),
+-    ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),
++    (unsigned char)(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )),
+     0,
+     0,
+   }
diff --git a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
index 64b2cc38c..6375c2ee0 100644
--- a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
+++ b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
@@ -38,6 +38,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
            file://0001-Fix-build-failures-with-gcc7.patch \
            file://c++11.patch \
            file://clang-c++11.patch \
+           file://fix-narrowing-warning.patch \
            \
            file://openhpi.init \
            file://openhpid.service \
-- 
2.14.1



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

* [meta-networking][PATCH V2 2/2] squid: Disable format-truncation warning only with gcc
  2017-08-28  5:38 [meta-networking][PATCH 1/2] openhpi: Fix ptest compile failures due to narrowing warnings with clang Khem Raj
@ 2017-08-28  5:38 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2017-08-28  5:38 UTC (permalink / raw)
  To: openembedded-devel

Clang does not support this option

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-networking/recipes-daemons/squid/squid_3.5.26.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb
index 9f0ae5da1..3ee96abb7 100644
--- a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb
+++ b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb
@@ -26,6 +26,9 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${P
            file://gcc7-fixes.patch \
            file://0001-tools.cc-fixed-unused-result-warning.patch \
            "
+
+SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"
+
 SRC_URI[md5sum] = "dc1830cd361e077814aa39bcc3691d8b"
 SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893cb8b8c2"
 
-- 
2.14.1



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

end of thread, other threads:[~2017-08-28  5:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28  5:38 [meta-networking][PATCH 1/2] openhpi: Fix ptest compile failures due to narrowing warnings with clang Khem Raj
2017-08-28  5:38 ` [meta-networking][PATCH V2 2/2] squid: Disable format-truncation warning only with gcc 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.