[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: maint: pacify GCC 14 -Wmissing-variable-declarations
From: |
Pádraig Brady |
Subject: |
Re: maint: pacify GCC 14 -Wmissing-variable-declarations |
Date: |
Wed, 1 May 2024 14:41:33 +0100 |
User-agent: |
Mozilla Thunderbird Beta |
On 28/04/2024 03:45, Collin Funk wrote:
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
I merged your attached two patches, adjusted them a little and pushed at:
https://github.com/coreutils/coreutils/commit/ba8a43c24
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.
That's a bit tricky as full prototypes would be a bit of a layering
violation with openssl headers, the way we've things set up.
I've pushed a fix to disable the error just in this portion of sort.c
thanks!
Pádraig
- Re: maint: pacify GCC 14 -Wmissing-variable-declarations,
Pádraig Brady <=