[oe-commits] [meta-openembedded] 78/79: openhpi: Fix ptest compile failures due to narrowing warnings with clang

git at git.openembedded.org git at git.openembedded.org
Mon Aug 28 09:20:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit fd5cc95a1249ef2099e7dd8c309a56f32014baec
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sun Aug 27 22:38:03 2017 -0700

    openhpi: Fix ptest compile failures due to narrowing warnings with clang
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../openhpi/files/fix-narrowing-warning.patch        | 20 ++++++++++++++++++++
 .../recipes-daemons/openhpi/openhpi_3.6.1.bb         |  1 +
 2 files changed, 21 insertions(+)

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 0000000..4c54570
--- /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 at 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 64b2cc3..6375c2e 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 \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list