maint: fix recent syntax-check failures

* .gitignore: Add new headers from gnulib.
* src/basenc.c: Adjust line length due to replacement
of 'verify' with 'static_assert'.
* src/od.c: Likewise.
This commit is contained in:
Pádraig Brady 2022-09-25 15:12:13 +01:00
parent eb7841426c
commit c86b6ec711
3 changed files with 10 additions and 7 deletions

2
.gitignore vendored
View File

@ -48,6 +48,7 @@
/lib/alloca.h
/lib/arg-nonnull.h
/lib/arpa/inet.h
/lib/assert.h
/lib/byteswap.h
/lib/c++defs.h
/lib/charset.alias
@ -98,6 +99,7 @@
/lib/stdalign.h
/lib/stdarg.h
/lib/stdbool.h
/lib/stdckdint.h
/lib/stddef.h
/lib/stdint.h
/lib/stdio.h

View File

@ -215,8 +215,8 @@ static_assert (DEC_BLOCKSIZE % 12 == 0); /* Complete encoded blocks are used. *
/* Note that increasing this may decrease performance if --ignore-garbage
is used, because of the memmove operation below. */
# define DEC_BLOCKSIZE (4200)
static_assert (DEC_BLOCKSIZE % 40 == 0); /* complete encoded blocks for base32 */
static_assert (DEC_BLOCKSIZE % 12 == 0); /* complete encoded blocks for base64 */
static_assert (DEC_BLOCKSIZE % 40 == 0); /* complete encoded blocks for base32*/
static_assert (DEC_BLOCKSIZE % 12 == 0); /* complete encoded blocks for base64*/
static int (*base_length) (int i);
static bool (*isbase) (char ch);

View File

@ -139,7 +139,8 @@ static unsigned int const bytes_to_hex_digits[] =
/* It'll be a while before we see integral types wider than 16 bytes,
but if/when it happens, this check will catch it. Without this check,
a wider type would provoke a buffer overrun. */
static_assert (MAX_INTEGRAL_TYPE_SIZE < ARRAY_CARDINALITY (bytes_to_hex_digits));
static_assert (MAX_INTEGRAL_TYPE_SIZE
< ARRAY_CARDINALITY (bytes_to_hex_digits));
/* Make sure the other arrays have the same length. */
static_assert (sizeof bytes_to_oct_digits == sizeof bytes_to_signed_dec_digits);