1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-01 08:58:47 +03:00

* add more 'const' - fixes gcc constness warning

This commit is contained in:
zkabelac 2010-02-15 18:34:00 +00:00
parent 03315d77f1
commit 14258c93de
2 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ static int _dev_name_disp(struct dm_report *rh, struct dm_pool *mem __attribute(
struct dm_report_field *field,
const void *data, void *private __attribute((unused)))
{
const char *name = dev_name(*(const struct device **) data);
const char *name = dev_name(*(const struct device * const *) data);
return dm_report_field_string(rh, field, &name);
}
@ -873,7 +873,7 @@ static int _pvmdafree_disp(struct dm_report *rh, struct dm_pool *mem,
{
struct lvmcache_info *info;
uint64_t freespace = UINT64_MAX, mda_free;
const char *pvid = (const char *)(&((struct id *) data)->uuid);
const char *pvid = (const char *)(&((const struct id *) data)->uuid);
struct metadata_area *mda;
if ((info = info_from_pvid(pvid, 0)))
@ -916,7 +916,7 @@ static int _pvmdasize_disp(struct dm_report *rh, struct dm_pool *mem,
{
struct lvmcache_info *info;
uint64_t min_mda_size = 0;
const char *pvid = (const char *)(&((struct id *) data)->uuid);
const char *pvid = (const char *)(&((const struct id *) data)->uuid);
/* PVs could have 2 mdas of different sizes (rounding effect) */
if ((info = info_from_pvid(pvid, 0)))

View File

@ -819,8 +819,8 @@ static int _report_headings(struct dm_report *rh)
*/
static int _row_compare(const void *a, const void *b)
{
const struct row *rowa = *(const struct row **) a;
const struct row *rowb = *(const struct row **) b;
const struct row *rowa = *(const struct row * const *) a;
const struct row *rowb = *(const struct row * const *) b;
const struct dm_report_field *sfa, *sfb;
uint32_t cnt;