Hi,

gnulib-tool.py feels pretty quick in Coreutils. :)

I noticed some new warnings from Fedora 40's gcc 14.
These patches are pretty much copied from Pauls gnulib commit here:

    
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4ab87e2642d887b8eac81bb7b2d6f14f326208b2

There are still these ones:

src/sort.c:2095:21: error: no previous declaration for 'ptr_MD5_Init' 
[-Werror=missing-variable-declarations]
 2095 | # define MD5_Init (*ptr_MD5_Init)
      |                     ^~~~~~~~~~~~
src/sort.c:2096:23: error: no previous declaration for 'ptr_MD5_Update' 
[-Werror=missing-variable-declarations]
 2096 | # define MD5_Update (*ptr_MD5_Update)
      |                       ^~~~~~~~~~~~~~
src/sort.c:2097:22: error: no previous declaration for 'ptr_MD5_Final' 
[-Werror=missing-variable-declarations]
 2097 | # define MD5_Final (*ptr_MD5_Final)
      |                      ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

I have a feeling the full prototypes have to be written before
including the openssl/md5.h header so:

    extern int (*ptr_MD5_Init) (MD5_CTX *);

and so on. I left them unchanged just in case anyone has a better idea.

Collin
From e179a4432343914868410227a98157b90e82a93a Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 27 Apr 2024 19:29:30 -0700
Subject: [PATCH 1/2] maint: pacify GCC 14 -Wmissing-variable-declarations,
 part 1

* src/local.mk: Add an extern decl for 'Version'.
---
 src/local.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/local.mk b/src/local.mk
index 96ee941ca..e93eb5fc9 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -633,6 +633,7 @@ src/version.c: Makefile
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)${MKDIR_P} src
 	$(AM_V_at)printf '#include <config.h>\n' > $@t
+	$(AM_V_at)printf 'extern const char *Version;\n' >> $@t
 	$(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
-- 
2.44.0

From d3e8736a87603806aeb6c14cca759ad22c33e897 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 27 Apr 2024 19:34:37 -0700
Subject: [PATCH 2/2] maint: pacify GCC 14 -Wmissing-variable-declarations,
 part 2

* src/crctab.c (crctab): Add an extern decl.
---
 src/crctab.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/crctab.c b/src/crctab.c
index fdf2fdf87..f9f82ef3c 100644
--- a/src/crctab.c
+++ b/src/crctab.c
@@ -1,6 +1,7 @@
 #include <config.h>
 #include <stdint.h>
 
+extern uint_fast32_t const crctab[8][256];
 uint_fast32_t const crctab[8][256] = {
 {
   0x00000000,
-- 
2.44.0

Reply via email to