mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 11:20:10 +01:00
Fix gcc warnings in tests.
This commit is contained in:
@@ -96,6 +96,9 @@ void xlog(const char *msg, const char *tst, const char *func, int line, const ch
|
||||
|
||||
#define CRYPT_FREE(x) do { crypt_free(x); x = NULL; } while (0)
|
||||
|
||||
/* to silent clang -Wcast-align when working with byte arrays */
|
||||
#define VOIDP_CAST(x) (x)(void*)
|
||||
|
||||
#define DMDIR "/dev/mapper/"
|
||||
|
||||
#define TST_SECTOR_SHIFT 9L
|
||||
|
||||
@@ -1370,7 +1370,7 @@ static int check_hash(const char *hash)
|
||||
|
||||
static int base64_test(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
char *s;
|
||||
size_t s_len;
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ int t_dm_check_versions(void)
|
||||
(unsigned)target->version[1],
|
||||
(unsigned)target->version[2]);
|
||||
}
|
||||
target = (struct dm_versions *)((char *) target + target->next);
|
||||
target = VOIDP_CAST(struct dm_versions *)((char *) target + target->next);
|
||||
} while (last_target != target);
|
||||
|
||||
r = 0;
|
||||
@@ -518,7 +518,7 @@ int loop_device(const char *loop)
|
||||
|
||||
static char *crypt_loop_get_device_old(void)
|
||||
{
|
||||
char dev[20];
|
||||
char dev[64];
|
||||
int i, loop_fd;
|
||||
struct loop_info64 lo64 = {0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user