Skip to content

Commit

Permalink
build: set -Wno-error=stringop-overread
Browse files Browse the repository at this point in the history
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
  • Loading branch information
garlick committed Dec 11, 2024
1 parent 25309f3 commit 8db949c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 8db949c

Please sign in to comment.