summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2022-09-25 15:12:13 +0100
committerPádraig Brady <P@draigBrady.com>2022-09-25 15:12:13 +0100
commitc86b6ec7112cb0a2c5172438bfac38a09e54dab0 (patch)
treef8eeaf7cf5f445f7f14fee8b5a33966f5e15ad87
parenteb7841426ce8cfb0150d4d2f4879ce455005fbbb (diff)
downloadcoreutils-c86b6ec7112cb0a2c5172438bfac38a09e54dab0.tar.gz
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.
-rw-r--r--.gitignore2
-rw-r--r--src/basenc.c12
-rw-r--r--src/od.c3
3 files changed, 10 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 56b7c323a..cce298f48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/src/basenc.c b/src/basenc.c
index 91539581b..7c0a1f1fc 100644
--- a/src/basenc.c
+++ b/src/basenc.c
@@ -184,8 +184,8 @@ from any other non-alphabet bytes in the encoded stream.\n"),
# define DEC_BLOCKSIZE (1024 * 5)
/* Ensure that BLOCKSIZE is a multiple of 5 and 8. */
-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 (ENC_BLOCKSIZE % 40 == 0); /* Padding chars only on last block. */
+static_assert (DEC_BLOCKSIZE % 40 == 0); /* Complete encoded blocks are used. */
# define base_encode base32_encode
# 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)
/* Ensure that BLOCKSIZE is a multiple of 3 and 4. */
-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 (ENC_BLOCKSIZE % 12 == 0); /* Padding chars only on last block. */
+static_assert (DEC_BLOCKSIZE % 12 == 0); /* Complete encoded blocks are used. */
# define base_encode base64_encode
# 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
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);
diff --git a/src/od.c b/src/od.c
index 09478ab04..6fff4ab02 100644
--- a/src/od.c
+++ b/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,
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);