mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-10 18:30:00 +01:00
Fix some compiler warnings introduced recently.
This commit is contained in:
@@ -57,7 +57,6 @@ struct volume_key {
|
||||
char key[];
|
||||
};
|
||||
|
||||
void crypt_memzero(void *s, size_t n);
|
||||
struct volume_key *crypt_alloc_volume_key(unsigned keylength, const char *key);
|
||||
struct volume_key *crypt_generate_volume_key(struct crypt_device *cd, unsigned keylength);
|
||||
void crypt_free_volume_key(struct volume_key *vk);
|
||||
|
||||
@@ -374,7 +374,8 @@ static int crypt_uuid_cmp(const char *dm_uuid, const char *hdr_uuid)
|
||||
static int crypt_uuid_type_cmp(struct crypt_device *cd, const char *type)
|
||||
{
|
||||
struct crypt_dm_active_device dmd = {};
|
||||
int r, len;
|
||||
size_t len;
|
||||
int r;
|
||||
|
||||
/* Must user header-on-disk if we know type here */
|
||||
if (cd->type || !cd->u.none.active_name)
|
||||
|
||||
@@ -45,6 +45,8 @@ void *crypt_safe_alloc(size_t size);
|
||||
void crypt_safe_free(void *data);
|
||||
void *crypt_safe_realloc(void *data, size_t size);
|
||||
|
||||
void crypt_memzero(void *s, size_t n);
|
||||
|
||||
ssize_t crypt_hex_to_bytes(const char *hex, char **result, int safe_alloc);
|
||||
int crypt_string_to_size(struct crypt_device *cd, const char *s, uint64_t *size);
|
||||
|
||||
|
||||
@@ -665,10 +665,10 @@ static ssize_t read_buf(int fd, void *buf, size_t count)
|
||||
if (s == 0)
|
||||
return (ssize_t)read_size;
|
||||
if (s > 0) {
|
||||
if (s != count)
|
||||
if (s != (ssize_t)count)
|
||||
log_dbg("Partial read %zd / %zu.", s, count);
|
||||
read_size += (size_t)s;
|
||||
buf += s;
|
||||
buf = (uint8_t*)buf + s;
|
||||
}
|
||||
} while (read_size != count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user