mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-23 18:05:42 +08:00
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:
parent
eb7841426c
commit
c86b6ec711
2
.gitignore
vendored
2
.gitignore
vendored
@ -48,6 +48,7 @@
|
|||||||
/lib/alloca.h
|
/lib/alloca.h
|
||||||
/lib/arg-nonnull.h
|
/lib/arg-nonnull.h
|
||||||
/lib/arpa/inet.h
|
/lib/arpa/inet.h
|
||||||
|
/lib/assert.h
|
||||||
/lib/byteswap.h
|
/lib/byteswap.h
|
||||||
/lib/c++defs.h
|
/lib/c++defs.h
|
||||||
/lib/charset.alias
|
/lib/charset.alias
|
||||||
@ -98,6 +99,7 @@
|
|||||||
/lib/stdalign.h
|
/lib/stdalign.h
|
||||||
/lib/stdarg.h
|
/lib/stdarg.h
|
||||||
/lib/stdbool.h
|
/lib/stdbool.h
|
||||||
|
/lib/stdckdint.h
|
||||||
/lib/stddef.h
|
/lib/stddef.h
|
||||||
/lib/stdint.h
|
/lib/stdint.h
|
||||||
/lib/stdio.h
|
/lib/stdio.h
|
||||||
|
12
src/basenc.c
12
src/basenc.c
@ -184,8 +184,8 @@ from any other non-alphabet bytes in the encoded stream.\n"),
|
|||||||
# define DEC_BLOCKSIZE (1024 * 5)
|
# define DEC_BLOCKSIZE (1024 * 5)
|
||||||
|
|
||||||
/* Ensure that BLOCKSIZE is a multiple of 5 and 8. */
|
/* Ensure that BLOCKSIZE is a multiple of 5 and 8. */
|
||||||
static_assert (ENC_BLOCKSIZE % 40 == 0); /* Padding chars only on last block. */
|
static_assert (ENC_BLOCKSIZE % 40 == 0); /* Padding chars only on last block. */
|
||||||
static_assert (DEC_BLOCKSIZE % 40 == 0); /* Complete encoded blocks are used. */
|
static_assert (DEC_BLOCKSIZE % 40 == 0); /* Complete encoded blocks are used. */
|
||||||
|
|
||||||
# define base_encode base32_encode
|
# define base_encode base32_encode
|
||||||
# define base_decode_context base32_decode_context
|
# define base_decode_context base32_decode_context
|
||||||
@ -199,8 +199,8 @@ static_assert (DEC_BLOCKSIZE % 40 == 0); /* Complete encoded blocks are used. *
|
|||||||
# define DEC_BLOCKSIZE (1024 * 3)
|
# define DEC_BLOCKSIZE (1024 * 3)
|
||||||
|
|
||||||
/* Ensure that BLOCKSIZE is a multiple of 3 and 4. */
|
/* Ensure that BLOCKSIZE is a multiple of 3 and 4. */
|
||||||
static_assert (ENC_BLOCKSIZE % 12 == 0); /* Padding chars only on last block. */
|
static_assert (ENC_BLOCKSIZE % 12 == 0); /* Padding chars only on last block. */
|
||||||
static_assert (DEC_BLOCKSIZE % 12 == 0); /* Complete encoded blocks are used. */
|
static_assert (DEC_BLOCKSIZE % 12 == 0); /* Complete encoded blocks are used. */
|
||||||
|
|
||||||
# define base_encode base64_encode
|
# define base_encode base64_encode
|
||||||
# define base_decode_context base64_decode_context
|
# define base_decode_context base64_decode_context
|
||||||
@ -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
|
/* Note that increasing this may decrease performance if --ignore-garbage
|
||||||
is used, because of the memmove operation below. */
|
is used, because of the memmove operation below. */
|
||||||
# define DEC_BLOCKSIZE (4200)
|
# define DEC_BLOCKSIZE (4200)
|
||||||
static_assert (DEC_BLOCKSIZE % 40 == 0); /* complete encoded blocks for base32 */
|
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 % 12 == 0); /* complete encoded blocks for base64*/
|
||||||
|
|
||||||
static int (*base_length) (int i);
|
static int (*base_length) (int i);
|
||||||
static bool (*isbase) (char ch);
|
static bool (*isbase) (char ch);
|
||||||
|
3
src/od.c
3
src/od.c
@ -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,
|
/* 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,
|
but if/when it happens, this check will catch it. Without this check,
|
||||||
a wider type would provoke a buffer overrun. */
|
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. */
|
/* Make sure the other arrays have the same length. */
|
||||||
static_assert (sizeof bytes_to_oct_digits == sizeof bytes_to_signed_dec_digits);
|
static_assert (sizeof bytes_to_oct_digits == sizeof bytes_to_signed_dec_digits);
|
||||||
|
Loading…
Reference in New Issue
Block a user