diff options
Diffstat (limited to 'meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch')
| -rw-r--r-- | meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch | 20 |
1 files changed, 20 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 @@ | |||
| 1 | Fix | ||
| 2 | |||
| 3 | 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] | ||
| 4 | ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | |||
| 8 | Index: 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 | } | ||
