mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
[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>
This commit is contained in:
parent
f2780c5d86
commit
576d4855d9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user