From 576d4855d9bb6cb6ca3d231ebc604836b8dba255 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Wed, 31 Oct 2018 13:38:03 -0700 Subject: [PATCH] [compiler-warnings-fixes] use correct fall through comment In some of the SDR calculating code, there were switch statements that had cases that would fall through deliberately into the next case. But the compiler didn't like the comment and would complain about the fall through anyway. This changes to a comment that the compiler recognizes. Partially resolves ipmitool/ipmitool#13 Signed-off-by: Vernon Mauery --- lib/ipmi_sdr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c index bac9bea..d51c174 100644 --- a/lib/ipmi_sdr.c +++ b/lib/ipmi_sdr.c @@ -205,7 +205,7 @@ sdr_convert_sensor_reading(struct sdr_record_full_sensor *sensor, uint8_t val) case 1: if (val & 0x80) val++; - /* Deliberately fall through to case 2. */ + /* fall through */ case 2: result = (double) (((m * (int8_t) val) + (b * pow(10, k1))) * pow(10, k2)); @@ -285,7 +285,7 @@ sdr_convert_sensor_hysterisis(struct sdr_record_full_sensor *sensor, uint8_t val case 1: if (val & 0x80) val++; - /* Deliberately fall through to case 2. */ + /* fall through */ case 2: result = (double) (((m * (int8_t) val) ) * pow(10, k2)); break; @@ -360,7 +360,7 @@ sdr_convert_sensor_tolerance(struct sdr_record_full_sensor *sensor, uint8_t val) case 1: if (val & 0x80) val++; - /* Deliberately fall through to case 2. */ + /* fall through */ case 2: result = (double) (((m * ((double)((int8_t) val)/2))) * pow(10, k2)); break;