]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: fix recent syntax-check failures
authorPádraig Brady <P@draigBrady.com>
Sun, 25 Sep 2022 14:12:13 +0000 (15:12 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 25 Sep 2022 14:12:13 +0000 (15:12 +0100)
* .gitignore: Add new headers from gnulib.
* src/basenc.c: Adjust line length due to replacement
of 'verify' with 'static_assert'.
* src/od.c: Likewise.

.gitignore
src/basenc.c
src/od.c

index 56b7c323a3d2f11d1308bc2c0945ff1c02d10b80..cce298f48722e66c612aedb8d35d55e6f9343ec1 100644 (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
index 91539581b5c3fb97ae46be0daebc52bfd9454b2c..7c0a1f1fc54157d6674b20dab38e830e699493e9 100644 (file)
@@ -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);
index 09478ab04639417a9cc087e65871d2a5d8133c46..6fff4ab02701630bee672bbac6ed15326d1167d9 100644 (file)
--- 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);