diff options
author | Alasdair Kergon <agk@redhat.com> | 2011-02-18 23:09:55 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2011-02-18 23:09:55 +0000 |
commit | a8d13f949926321f54f291d1c90f8739970e05dd (patch) | |
tree | 721ddb3561bc81d474c1351e3fe2a15f85ba0346 /libdm/libdm-report.c | |
parent | faf2288895deba6b5b91da71f62a45a0ef7d75fa (diff) | |
download | lvm2-a8d13f949926321f54f291d1c90f8739970e05dd.tar.gz lvm2-a8d13f949926321f54f291d1c90f8739970e05dd.tar.xz lvm2-a8d13f949926321f54f291d1c90f8739970e05dd.zip |
Handle decimal digits with --units instead of ignoring them silently.
Fix remaining warnings and compile with -Wpointer-arith.
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r-- | libdm/libdm-report.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 02122841..19f57362 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -675,15 +675,15 @@ int dm_report_set_output_field_name_prefix(struct dm_report *rh, const char *out /* * Create a row of data for an object */ -static void * _report_get_field_data(struct dm_report *rh, - struct field_properties *fp, void *object) +static void *_report_get_field_data(struct dm_report *rh, + struct field_properties *fp, void *object) { - void *ret = fp->type->data_fn(object); + char *ret = fp->type->data_fn(object); if (!ret) return NULL; - return ret + rh->fields[fp->field_num].offset; + return (void *)(ret + rh->fields[fp->field_num].offset); } int dm_report_object(struct dm_report *rh, void *object) |