Silenced some compiler warnings, found by Clang.
This commit is contained in:
parent
adea0bada1
commit
7fb9a517fe
@ -76,15 +76,6 @@ static BLAKE2_INLINE uint64_t make64(const uint32_t a, const uint32_t b)
|
|||||||
((uint64_t)(b) << 32);
|
((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)
|
static BLAKE2_INLINE uint32_t rotr32(const uint32_t w, const unsigned c)
|
||||||
{
|
{
|
||||||
return (w >> c) | (w << (32 - c));
|
return (w >> c) | (w << (32 - c));
|
||||||
|
@ -168,7 +168,7 @@ static int weak_passphrase(const char *str)
|
|||||||
int flags[4U] = { 0, 0, 0, 0 };
|
int flags[4U] = { 0, 0, 0, 0 };
|
||||||
while (*str)
|
while (*str)
|
||||||
{
|
{
|
||||||
const CHR c = *str++;
|
const int c = *str++;
|
||||||
if (isalpha(c))
|
if (isalpha(c))
|
||||||
{
|
{
|
||||||
flags[isupper(c) ? 0U : 1U] = 1;
|
flags[isupper(c) ? 0U : 1U] = 1;
|
||||||
@ -208,7 +208,7 @@ static int generate_passphrase(const size_t length)
|
|||||||
}
|
}
|
||||||
buffer[passwd_len] = '\0';
|
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);
|
FPRINTF(stdout, T("%") T(PRIstr) T("\n\n"), buffer);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
Loading…
Reference in New Issue
Block a user