summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-27 22:38:03 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-09-12 10:55:06 -0400
commit5921a63439fcfd8b786d0a21231dfdc027eaa911 (patch)
tree5c0f3150c65d81179eb0873180270fcd803c90a5 /meta-networking
parent1e4140725678e8f9b85d41feb6383e757e0e8f03 (diff)
downloadmeta-openembedded-5921a63439fcfd8b786d0a21231dfdc027eaa911.tar.gz
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> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.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 000000000..4c545708f
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch
@@ -0,0 +1,20 @@
1Fix
2
3sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
4((dRExp << 4) & 0xf0) | (dBExp & 0x0f ), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8Index: openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
9===================================================================
10--- openhpi-3.6.1.orig/plugins/ipmidirect/t/sensor_factors_000.cpp
11+++ openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
12@@ -63,7 +63,7 @@ static cIpmiSdr sdr =
13 dB & 0xff,
14 ((dB >> 2) & 0xc0) | (dAccuracy & 0x3f),
15 ((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c),
16- ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),
17+ (unsigned char)(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )),
18 0,
19 0,
20 }
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 \
38 file://0001-Fix-build-failures-with-gcc7.patch \ 38 file://0001-Fix-build-failures-with-gcc7.patch \
39 file://c++11.patch \ 39 file://c++11.patch \
40 file://clang-c++11.patch \ 40 file://clang-c++11.patch \
41 file://fix-narrowing-warning.patch \
41 \ 42 \
42 file://openhpi.init \ 43 file://openhpi.init \
43 file://openhpid.service \ 44 file://openhpid.service \