build: fix compilation on el9 with older pmix releases #106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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