Skip to content
Snippets Groups Projects
Commit 950b9b59 authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Handle gcc "ignoring return value" warning

reported when compiling with optimizations (-O2).
parent f3fca3f3
No related branches found
No related tags found
No related merge requests found
......@@ -2620,7 +2620,7 @@ static bool _verify_clustername(void)
{
FILE *fp;
char *filename = NULL;
char name[512];
char name[512] = {0};
bool create_file = false;
xstrfmtcat(filename, "%s/clustername",
......@@ -2628,7 +2628,10 @@ static bool _verify_clustername(void)
if ((fp = fopen(filename, "r"))) {
/* read value and compare */
fgets(name, sizeof(name), fp);
if (!fgets(name, sizeof(name), fp)) {
error("%s: reading cluster name from clustername file",
__func__);
}
fclose(fp);
if (xstrcmp(name, slurmctld_conf.cluster_name)) {
fatal("CLUSTER NAME MISMATCH.\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment