drivers: fix double promotion warnings
With -Wdouble-promotion added to the warning base, fix warnings given by the compiler. Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
This commit is contained in:
parent
a6f932a194
commit
b7bedb5c1e
9 changed files with 45 additions and 45 deletions
|
@ -161,7 +161,7 @@ static inline void lsm9ds0_gyro_convert(struct sensor_value *val, int raw_val,
|
|||
{
|
||||
double dval;
|
||||
|
||||
dval = (double)(raw_val) * numerator / 1000.0 * DEG2RAD;
|
||||
dval = (double)(raw_val) * (double)numerator / 1000.0 * DEG2RAD;
|
||||
val->val1 = (int32_t)dval;
|
||||
val->val2 = ((int32_t)(dval * 1000000)) % 1000000;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue