From c06d767ada43a454daf9de576ce9e4b41eebc287 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Wed, 1 May 2024 14:15:28 +0100 Subject: [PATCH] maint: pacify GCC 14 -Wmissing-variable-declarations wrt md5.h * src/sort.c: Use pragmas to avoid warnings with our openssl adjustment and to minimize coupling with openssl. --- src/sort.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sort.c b/src/sort.c index 78983ff275..32e4c73a2f 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2092,6 +2092,12 @@ getmonth (char const *month, char **ea) trick md5.h into declaring and using pointers to functions not functions. This causes the compiler's -lcrypto option to have no effect, as sort.o no longer uses any crypto symbols statically. */ + +# if 4 < __GNUC__ + (8 <= __GNUC_MINOR__) + /* Pacify gcc -Wmissing-variable-declarations through at least GCC 14. */ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmissing-variable-declarations" +# endif # define MD5_Init (*ptr_MD5_Init) # define MD5_Update (*ptr_MD5_Update) # define MD5_Final (*ptr_MD5_Final) @@ -2131,6 +2137,9 @@ link_libcrypto (void) ptr_MD5_Init = symbol_address (handle, "MD5_Init"); ptr_MD5_Update = symbol_address (handle, "MD5_Update"); ptr_MD5_Final = symbol_address (handle, "MD5_Final"); +# if 4 < __GNUC__ + (8 <= __GNUC_MINOR__) +# pragma GCC diagnostic pop +# endif #endif } -- 2.47.2