From 8db949cd3cdf45567801ff28d1050faa249bac60 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 11 Dec 2024 13:22:05 -0800 Subject: [PATCH] build: set -Wno-error=stringop-overread Problem: compilation fails in the TOSS 5 build farm with pmix-3.2.5. pmix.c: In function 'op_initialize.part.0': pmix.c:175:10: error: 'PMIx_Get' reading 512 bytes from a region of size 14 [-Werror=stringop-overread] 175 | rc = PMIx_Get (&proc, PMIX_JOB_SIZE, NULL, 0, &val); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pmix.c:175:10: note: referencing argument 2 of type 'const char *' In file included from pmix.c:21: /usr/include/pmix.h:203:27: note: in a call to function 'PMIx_Get' 203 | PMIX_EXPORT pmix_status_t PMIx_Get(const pmix_proc_t *proc, const pmix_key_t key, | ^~~~~~~~ cc1: all warnings being treated as errors This is probably due to the fact that PMIx_Get() in pmix-3.2.5 is prototyped with the second arg effectively 'const char key[512]'. It is declared as a 'const char key[]' in modern pmix releases. Since PMIx_Get() is used in more than one place, disable the promotion of that warning to an error project-wide. Fixes #100 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bf3813b..dae7afd 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ AX_COMPILER_VENDOR AX_COMPILER_VERSION AS_CASE($ax_cv_c_compiler_vendor, [clang | gnu], [ - WARNING_CFLAGS="-Wall -Werror -Wno-strict-aliasing -Wno-error=deprecated-declarations" + WARNING_CFLAGS="-Wall -Werror -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-error=stringop-overread" ] ) AC_SUBST([WARNING_CFLAGS])