-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Building Spindle with GCC 15 fails in src/utils/parseloc.c when compiling the SLURM plugin
../../src/utils/parseloc.c: In function 'parse_location_impl':
../../src/utils/parseloc.c:106:25: error: too many arguments to function 'custom_getenv'; expected 0, have 1
106 | env_value = custom_getenv(envvar);
| ^~~~~~~~~~~~~ ~~~~~~
../../src/utils/parseloc.c:46:14: note: declared here
46 | extern char *custom_getenv();
| ^~~~~~~~~~~~~
Root Cause:
parseloc declares custom_getenv with an empty parameter list:
Line 46 in 4174224
| extern char *custom_getenv(); |
while the actual definition in src/slurm_plugin/slurm_plugin has always taken one argument:
Spindle/src/slurm_plugin/slurm_plugin.c
Lines 509 to 512 in 4174224
| char *custom_getenv(char *envname) | |
| { | |
| return readSpankEnv(current_spank, envname); | |
| } |
C Reference denotes the empty parameter list is obsolete in c23, GNU Reference calls it bad practice.
Suggested fix
Update the declaration in src/utils/parseloc.c:46 to match the slurm plugin definition:
extern char *custom_getenv(char *envname);
Environment
- Spindle: devel branch (commit 4174224)
- OS: Rocky Linux 10.1 (Red Quartz)
- Compiler: GCC 15 (gnu15 toolchain)
- Affected files: src/utils/parseloc.c:46, src/slurm_plugin/slurm_plugin.c:509
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels