aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-27 22:38:03 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-31 14:59:52 +0200
commit3ec9d3103e997071aad11ecc52e479a0a9e4b095 (patch)
tree9970000b9132c7d81923000397d9019cfcc8cb36 /meta-networking
parentf45593d87c6b0d3aaa343e009e1cb078793461b1 (diff)
downloadmeta-openembedded-contrib-3ec9d3103e997071aad11ecc52e479a0a9e4b095.tar.gz
meta-openembedded-contrib-3ec9d3103e997071aad11ecc52e479a0a9e4b095.tar.bz2
meta-openembedded-contrib-3ec9d3103e997071aad11ecc52e479a0a9e4b095.zip
openhpi: Fix ptest compile failures due to narrowing warnings with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch20
-rw-r--r--meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb1
2 files changed, 21 insertions, 0 deletions
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 0000000000..4c545708fc
--- /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 64b2cc38cc..6375c2ee0e 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 \