Fix some compiler warnings.

This commit is contained in:
Milan Broz
2018-07-19 12:49:59 +02:00
parent 081aa18f39
commit 1112da76f1
3 changed files with 5 additions and 2 deletions

View File

@@ -589,7 +589,8 @@ int LUKS2_disk_hdr_read(struct crypt_device *cd, struct luks2_hdr *hdr,
struct luks2_hdr_disk hdr_disk1, hdr_disk2;
char *json_area1 = NULL, *json_area2 = NULL;
json_object *jobj_hdr1 = NULL, *jobj_hdr2 = NULL;
int i, r;
unsigned int i;
int r;
uint64_t hdr_size;
uint64_t hdr2_offsets[] = LUKS2_HDR2_OFFSETS;

View File

@@ -1036,6 +1036,7 @@ static void crypt_free_type(struct crypt_device *cd)
crypt_free_volume_key(cd->u.integrity.journal_mac_key);
} else if (!cd->type) {
free(cd->u.none.active_name);
cd->u.none.active_name = NULL;
}
crypt_set_null_type(cd);

View File

@@ -139,8 +139,9 @@ int blk_superblocks_filter_luks(struct blkid_handle *h)
{
int r = -ENOTSUP;
#ifdef HAVE_BLKID
char luks[] = "crypto_LUKS";
char *luks_filter[] = {
"crypto_LUKS",
luks,
NULL
};
r = blkid_probe_filter_superblocks_type(h->pr, BLKID_FLTR_NOTIN, luks_filter);