blob: eabffa7d9c4bd951514136baf60c84e7f32d0547 [file] [log] [blame]
Patrick Williams520786c2023-06-25 16:20:36 -05001Upstream-Status: Pending
2
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003Fix
4
5sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
6((dRExp << 4) & 0xf0) | (dBExp & 0x0f ), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Index: openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
11===================================================================
12--- openhpi-3.6.1.orig/plugins/ipmidirect/t/sensor_factors_000.cpp
13+++ openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
14@@ -63,7 +63,7 @@ static cIpmiSdr sdr =
15 dB & 0xff,
16 ((dB >> 2) & 0xc0) | (dAccuracy & 0x3f),
17 ((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c),
18- ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),
19+ (unsigned char)(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )),
20 0,
21 0,
22 }