Avoid compilation warning if configured with --disable-blkid.

This commit is contained in:
Milan Broz
2022-04-19 21:15:32 +02:00
parent e4a0d25315
commit 4b1ba47ca1

View File

@@ -335,9 +335,9 @@ int blk_supported(void)
unsigned blk_get_block_size(struct blkid_handle *h)
{
const char *data;
unsigned block_size = 0;
#ifdef HAVE_BLKID
const char *data;
if (!blk_is_superblock(h) || !blkid_probe_has_value(h->pr, "BLOCK_SIZE") ||
blkid_probe_lookup_value(h->pr, "BLOCK_SIZE", &data, NULL) ||
sscanf(data, "%u", &block_size) != 1)