control: tags -1 + patch
thanks

On Mon, 17 Feb 2025, 18:00 Matthias Klose, <d...@debian.org> wrote:
>
> The package fails to build in a test rebuild on at least amd64 with
> gcc-15

The attached patch should fix this

The failure is because in c/md5.c the PROTO_LIST macro removes the
arguments unless PROTOTYPES is defined as 1. this means that functions
are being declared as having
no arguments, -- gcc-15 no longer supports this.

There are also a lot of warnings about (very) old-school definitions
that have the type not in the brackets. these are now warned about, so
this patch fixes those as well.

(you might get away with only the first hunk, but there will then be
lots of warnings about very old ways of declaring arguments).


Hope that helps (nb:  the git repository is missing around 2 years of
NMUs, including the addition of 'Rules-Requires-Root: binary-targets'
which is needed to make it build).
diff --git a/c/md5.c b/c/md5.c
index 10b45df..3a28eb3 100644
--- a/c/md5.c
+++ b/c/md5.c
@@ -3,11 +3,11 @@
 
 /* PROTOTYPES should be set to one if and only if the compiler supports
   function argument prototyping.
-The following makes PROTOTYPES default to 0 if it has not already
+The following makes PROTOTYPES default to 1 if it has not already
   been defined with C compiler flags.
  */
 #ifndef PROTOTYPES
-#define PROTOTYPES 0
+#define PROTOTYPES 1
 #endif
 
 /* POINTER defines a generic pointer type */
@@ -167,8 +167,9 @@ Rotation is separate from addition to prevent recomputation.
 
 /* MD5 initialization. Begins an MD5 operation, writing a new context.
  */
-void MD5Init (context)
-MD5_CTX *context;                                        /* context */
+void MD5Init (
+MD5_CTX *context                                         /* context */
+)
 {
   context->count[0] = context->count[1] = 0;
   /* Load magic initialization constants.
@@ -183,10 +184,11 @@ MD5_CTX *context;                                        /* context */
   operation, processing another message block, and updating the
   context.
  */
-void MD5Update (context, input, inputLen)
-MD5_CTX *context;                                        /* context */
-unsigned char *input;                                /* input block */
-unsigned int inputLen;                     /* length of input block */
+void MD5Update (
+MD5_CTX *context,                                        /* context */
+unsigned char *input,                                /* input block */
+unsigned int inputLen                      /* length of input block */
+)
 {
   unsigned int i, index, partLen;
 
@@ -225,9 +227,10 @@ unsigned int inputLen;                     /* length of input block */
 /* MD5 finalization. Ends an MD5 message-digest operation, writing the
   the message digest and zeroizing the context.
  */
-void MD5Final (digest, context)
-unsigned char digest[16];                         /* message digest */
-MD5_CTX *context;                                       /* context */
+void MD5Final (
+unsigned char digest[16],                         /* message digest */
+MD5_CTX *context                                         /* context */
+)
 {
   unsigned char bits[8];
   unsigned int index, padLen;
@@ -253,9 +256,10 @@ MD5_CTX *context;                                       /* context */
 
 /* MD5 basic transformation. Transforms state based on block.
  */
-static void MD5Transform (state, block)
-UINT4 state[4];
-unsigned char block[64];
+static void MD5Transform (
+UINT4 state[4],
+unsigned char block[64]
+)
 {
   UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
 
@@ -346,10 +350,11 @@ unsigned char block[64];
 /* Encodes input (UINT4) into output (unsigned char). Assumes len is
   a multiple of 4.
  */
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
+static void Encode (
+unsigned char *output,
+UINT4 *input,
+unsigned int len
+)
 {
   unsigned int i, j;
 
@@ -364,10 +369,11 @@ unsigned int len;
 /* Decodes input (unsigned char) into output (UINT4). Assumes len is
   a multiple of 4.
  */
-static void Decode (output, input, len)
-UINT4 *output;
-unsigned char *input;
-unsigned int len;
+static void Decode (
+UINT4 *output,
+unsigned char *input,
+unsigned int len
+)
 {
   unsigned int i, j;
 
@@ -379,10 +385,11 @@ unsigned int len;
 /* Note: Replace "for loop" with standard memcpy if possible.
  */
 
-static void MD5_memcpy (output, input, len)
-POINTER output;
-POINTER input;
-unsigned int len;
+static void MD5_memcpy (
+POINTER output,
+POINTER input,
+unsigned int len
+)
 {
   unsigned int i;
 
@@ -392,10 +399,11 @@ unsigned int len;
 
 /* Note: Replace "for loop" with standard memset if possible.
  */
-static void MD5_memset (output, value, len)
-POINTER output;
-int value;
-unsigned int len;
+static void MD5_memset (
+POINTER output,
+int value,
+unsigned int len
+)
 {
   unsigned int i;
 
@@ -482,9 +490,10 @@ Arguments (may be any combination):
   filename - digests file
   (none)   - digests standard input
  */
-int main (argc, argv)
-int argc;
-char *argv[];
+int main (
+int argc,
+char *argv[]
+)
 {
   int i;
 
@@ -506,8 +515,9 @@ char *argv[];
 
 /* Digests a string and prints the result.
  */
-static void MDString (string)
-char *string;
+static void MDString (
+char *string
+)
 {
   MD_CTX context;
   unsigned char digest[16];
@@ -580,8 +590,9 @@ static void MDTestSuite ()
 
 /* Digests a file and prints the result.
  */
-static void MDFile (filename)
-char *filename;
+static void MDFile (
+char *filename
+)
 {
   FILE *file;
   MD_CTX context;
@@ -624,12 +635,12 @@ static void MDFilter ()
 
 /* Prints a message digest in hexadecimal.
  */
-static void MDPrint (digest)
-unsigned char digest[16];
+static void MDPrint (
+unsigned char digest[16]
+)
 {
   unsigned int i;
 
   for (i = 0; i < 16; i++)
  printf ("%02x", digest[i]);
 }
-
diff --git a/c/realpath.c b/c/realpath.c
index 1e29d71..3c3070b 100644
--- a/c/realpath.c
+++ b/c/realpath.c
@@ -243,9 +243,10 @@ int decomp;
 }
 
 int
-main(argc, argv)
-int argc;
-char **argv;
+main(
+int argc,
+char **argv
+)
 {
      char path[MAXPATHLEN+1];
      char rpath[MAXPATHLEN+1];
diff --git a/c/snefru.c b/c/snefru.c
index 7955be6..e0c9ba5 100644
--- a/c/snefru.c
+++ b/c/snefru.c
@@ -1142,8 +1142,9 @@ word32 standardSBoxes[MAX_SBOX_COUNT][256]= {
  * message and aborts
  */
 void
-ErrAbort (s)
-	char   *s;
+ErrAbort (
+	char   *s
+)
 {
 	fprintf (stderr, "%s\n", s);
 	exit (1);
@@ -1158,11 +1159,12 @@ ErrAbort (s)
  * However, it is not very efficient.
  */
 void
-ConvertChunkOfBytes (charBuffer, wordBuffer)
+ConvertChunkOfBytes (
 	/* an input buffer of characters */
-	char    charBuffer[CHUNK_SIZE*4];
+	char    charBuffer[CHUNK_SIZE*4],
 	/* an output buffer of word32's */
-	word32 wordBuffer[CHUNK_SIZE];
+	word32 wordBuffer[CHUNK_SIZE]
+)
 {
 	int     i;
 	word32 t0, t1, t2, t3;
@@ -1189,8 +1191,9 @@ ConvertChunkOfBytes (charBuffer, wordBuffer)
  * pads the output array, "buf", with trailing 0 bytes.
  */
 int
-ReadChunk (buf)
-	word32 buf[CHUNK_SIZE];
+ReadChunk (
+	word32 buf[CHUNK_SIZE]
+)
 {
 	char    charBuf[CHUNK_SIZE*4];
 	int     byteCount;
@@ -1222,9 +1225,10 @@ ReadChunk (buf)
  * possible, it requires great caution.
  */
 void
-HashN (output, input)
-	word32 output[OUTPUT_BLOCK_SIZE];
-	word32 input[INPUT_BLOCK_SIZE];
+HashN (
+	word32 output[OUTPUT_BLOCK_SIZE],
+	word32 input[INPUT_BLOCK_SIZE]
+)
 {
 	static int shiftTable[4] = {16, 8, 16, 24};
 	/* the array of data being hashed  */
@@ -1286,9 +1290,10 @@ HashN (output, input)
  * possible, it requires great caution.
  */
 void
-Hash512 (output, input)
-	word32 output[OUTPUT_BLOCK_SIZE];
-	word32 input[INPUT_BLOCK_SIZE];
+Hash512 (
+	word32 output[OUTPUT_BLOCK_SIZE],
+	word32 input[INPUT_BLOCK_SIZE]
+)
 {
 	static int shiftTable[4] = {16, 8, 16, 24};
 	/* the array of data being hashed  */
@@ -1382,9 +1387,10 @@ Hash512 (output, input)
  * This routine increments a 64-bit counter by the given increment.
  */
 void
-Increment64BitCounter (counter, increment)
-	word32 counter[2];
-	long int increment;
+Increment64BitCounter (
+	word32 counter[2],
+	long int increment
+)
 {
 	word32 maxInt = 0xffffffffL;
 

Reply via email to