summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@intel.com>2018-10-31 13:38:03 -0700
committerAlexander Amelkin <mocbuhtig@amelkin.msk.ru>2018-11-11 14:55:43 +0300
commit576d4855d9bb6cb6ca3d231ebc604836b8dba255 (patch)
tree4a93a5fcd9a040b619fc8d947cabd9830643f9a0
parentf2780c5d8611c428b8ce21a0986a5caf2346fd16 (diff)
downloadipmitool-576d4855d9bb6cb6ca3d231ebc604836b8dba255.tar.gz
[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 <vernon.mauery@intel.com>
-rw-r--r--lib/ipmi_sdr.c6
1 files 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;