Silenced some compiler warnings, found by Clang.

This commit is contained in:
LoRd_MuldeR 2021-03-24 20:23:14 +01:00
parent adea0bada1
commit 7fb9a517fe
Signed by: mulder
GPG Key ID: 2B5913365F57E03F
2 changed files with 2 additions and 11 deletions

View File

@ -76,15 +76,6 @@ static BLAKE2_INLINE uint64_t make64(const uint32_t a, const uint32_t b)
((uint64_t)(b) << 32);
}
static BLAKE2_INLINE void store32(void *const dst, const uint32_t w)
{
uint8_t *const p = (uint8_t*)dst;
p[0] = (uint8_t)(w >> 0);
p[1] = (uint8_t)(w >> 8);
p[2] = (uint8_t)(w >> 16);
p[3] = (uint8_t)(w >> 24);
}
static BLAKE2_INLINE uint32_t rotr32(const uint32_t w, const unsigned c)
{
return (w >> c) | (w << (32 - c));

View File

@ -168,7 +168,7 @@ static int weak_passphrase(const char *str)
int flags[4U] = { 0, 0, 0, 0 };
while (*str)
{
const CHR c = *str++;
const int c = *str++;
if (isalpha(c))
{
flags[isupper(c) ? 0U : 1U] = 1;
@ -208,7 +208,7 @@ static int generate_passphrase(const size_t length)
}
buffer[passwd_len] = '\0';
}
while ((!isalpha(buffer[0U])) || (!isalnum(buffer[passwd_len - 1U])) || weak_passphrase(buffer));
while ((!isalpha((int)buffer[0U])) || (!isalnum((int)buffer[passwd_len - 1U])) || weak_passphrase(buffer));
FPRINTF(stdout, T("%") T(PRIstr) T("\n\n"), buffer);
fflush(stdout);