These were found by clang.
* gl/lib/rand-isaac.c (min):
* gl/lib/randint.c (shift_right):
* src/md5sum.c (algorithm):
Remove; unused.
__attribute__ ((__no_sanitize_undefined__))
#endif
-/* The minimum of two sizes A and B. */
-static inline size_t
-min (size_t a, size_t b)
-{
- return (a < b ? a : b);
-}
-
/* A if 32-bit ISAAC, B if 64-bit. This is a macro, not an inline
function, to prevent undefined behavior if the unused argument
shifts by more than a word width. */
return HUGE_BYTES ? 0 : x << CHAR_BIT;
}
-/* Return X shifted right by CHAR_BIT bits. */
-static inline randint
-shift_right (randint x)
-{
- return HUGE_BYTES ? 0 : x >> CHAR_BIT;
-}
-
/* Consume random data from *S to generate a random number in the range
0 .. GENMAX. */
/* Increase RANDMAX by appending random bytes to RANDNUM and
UCHAR_MAX to RANDMAX until RANDMAX is no less than
GENMAX. This may lose up to CHAR_BIT bits of information
- if shift_right (RANDINT_MAX) < GENMAX, but it is not
- worth the programming hassle of saving these bits since
- GENMAX is rarely that large in practice. */
+ if (HUGE_BYTES ? 0 : RANDINT_MAX >> CHAR_BIT) < GENMAX,
+ but it is not worth the programming hassle of saving
+ these bits since GENMAX is rarely that large in practice. */
i = 0;
{
BLAKE2b
};
-static enum Algorithm const algorithm[] =
-{
- BLAKE2b
-};
-ARGMATCH_VERIFY (algorithm_in_string, algorithm);
-ARGMATCH_VERIFY (algorithm_out_string, algorithm);
+verify (ARRAY_CARDINALITY (algorithm_in_string) == 2);
+verify (ARRAY_CARDINALITY (algorithm_out_string) == 2);
static enum Algorithm b2_algorithm;
static uintmax_t b2_length;