}
while (getline(&line, &len, fl) != -1) {
- if (sscanf(line, "%d %255s\n", &num, &nm[0]) == 2) {
+ if (sscanf(line, "%u %255s\n", &num, &nm[0]) == 2) {
if (!strcmp(name, nm)) {
if (number) {
*number = num;
int strict = mode != DM_STRING_MANGLING_NONE;
char str_rest[DM_NAME_LEN];
size_t i, j;
- int code;
+ unsigned int code;
int r = 0;
if (!str || !buf)
p->orig_pool,
p->name, p->stats.bytes);
#else
- log_error(" [%p] %s", p, p->name);
+ log_error(" [%p] %s", (void *)p, p->name);
#endif
}
pthread_mutex_unlock(&_dm_pools_mutex);
keylen = strlen("scan_lvs:");
if (!strncmp(_hint_line, "scan_lvs:", keylen)) {
- int scan_lvs = 0;
+ unsigned scan_lvs = 0;
if ((sscanf(_hint_line + keylen, "%u", &scan_lvs) != 1) ||
scan_lvs != cmd->scan_lvs) {
log_debug("ignore hints with different or unreadable scan_lvs");
dev_name(devl->dev),
(int)MAJOR(devl->dev->dev),
(int)MINOR(devl->dev->dev),
- devl->dev->bcache_fd, bb);
+ devl->dev->bcache_fd, (void *)bb);
ret = _process_block(cmd, f, devl->dev, bb, 0, 0, &is_lvm_device);
dm_config_destroy(cft);
} else {
if (vg->vg_precommitted)
- log_error(INTERNAL_ERROR "vg_read vg %p vg_precommitted %p", vg, vg->vg_precommitted);
+ log_error(INTERNAL_ERROR "vg_read vg %p vg_precommitted %p", (void *)vg, (void *)vg->vg_precommitted);
if (vg->vg_committed)
- log_error(INTERNAL_ERROR "vg_read vg %p vg_committed %p", vg, vg->vg_committed);
+ log_error(INTERNAL_ERROR "vg_read vg %p vg_committed %p", (void *)vg, (void *)vg->vg_committed);
}
out:
/* We return with the VG lock held when read is successful. */
*/
if (error_vg && vg) {
if (vg->vg_precommitted)
- log_error(INTERNAL_ERROR "vg_read vg %p vg_precommitted %p", vg, vg->vg_precommitted);
+ log_error(INTERNAL_ERROR "vg_read vg %p vg_precommitted %p", (void *)vg, (void *)vg->vg_precommitted);
if (vg->vg_committed)
- log_error(INTERNAL_ERROR "vg_read vg %p vg_committed %p", vg, vg->vg_committed);
+ log_error(INTERNAL_ERROR "vg_read vg %p vg_committed %p", (void *)vg, (void *)vg->vg_committed);
/* caller must unlock_vg and release_vg */
*error_vg = vg;
dm_list_init(&vg->removed_historical_lvs);
dm_list_init(&vg->removed_pvs);
- log_debug_mem("Allocated VG %s at %p.", vg->name ? : "<no name>", vg);
+ log_debug_mem("Allocated VG %s at %p.", vg->name ? : "<no name>", (void *)vg);
return vg;
}
return;
}
- log_debug_mem("Freeing VG %s at %p.", vg->name ? : "<no name>", vg);
+ log_debug_mem("Freeing VG %s at %p.", vg->name ? : "<no name>", (void *)vg);
dm_hash_destroy(vg->hostnames);
dm_pool_destroy(vg->vgmem);
const char *line, size_t *mstats)
{
const struct dm_config_value *cv;
- long from, to;
+ unsigned long from, to;
int pos;
unsigned i;
char fr, fw, fx, fp;
}
while (getline(&line, &len, fl) != -1) {
- if (sscanf(line, "%d %255s\n", &num, &nm[0]) == 2) {
+ if (sscanf(line, "%u %255s\n", &num, &nm[0]) == 2) {
if (!strcmp(name, nm)) {
if (number) {
*number = num;
int strict = mode != DM_STRING_MANGLING_NONE;
char str_rest[DM_NAME_LEN];
size_t i, j;
- int code;
+ unsigned int code;
int r = 0;
if (!str || !buf)
if (dms->bind_major > 0 || dms->bind_name || dms->bind_uuid)
return 1;
/* %p format specifier expects a void pointer. */
- log_error("Stats handle at %p is not bound.", dms);
+ log_error("Stats handle at %p is not bound.", (const void *)dms);
return 0;
}
p->orig_pool,
p->name, p->stats.bytes);
#else
- log_error(" [%p] %s", p, p->name);
+ log_error(" [%p] %s", (void *)p, p->name);
#endif
}
pthread_mutex_unlock(&_dm_pools_mutex);