[lvm-devel] [PATCH 4/6] Cleanup float arithmetic gcc warning
Zdenek Kabelac
zkabelac at redhat.com
Wed Feb 10 14:55:43 UTC 2010
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
lib/report/report.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/report/report.c b/lib/report/report.c
index cf037cb..e27f4e1 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -1055,7 +1055,7 @@ static int _snpercent_disp(struct dm_report *rh __attribute((unused)), struct dm
return 0;
}
- *sortval = snap_percent * UINT64_C(1000);
+ *sortval = (uint64_t)(snap_percent * 1000.f);
dm_report_field_set_value(field, repstr, sortval);
return 1;
@@ -1097,7 +1097,7 @@ static int _copypercent_disp(struct dm_report *rh __attribute((unused)),
return 0;
}
- *sortval = percent * UINT64_C(1000);
+ *sortval = (uint64_t)(percent * 1000.f);
dm_report_field_set_value(field, repstr, sortval);
return 1;
--
1.6.6.1
More information about the lvm-devel
mailing list