You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.6 KiB

commit ce22168173e63d77a566f753b3d697288f62fbcc
Author: Ankit Kumar <ankit@linux.vnet.ibm.com>
Date: Mon Dec 4 11:48:55 2017 +0530
Fixes build warning
This patch fixes ppc64-diag build warning.
Signed-off-by: Ankit Kumar <ankit@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
diff --git a/diags/homerun.c b/diags/homerun.c
index cdae58b..d9a6fc9 100644
--- a/diags/homerun.c
+++ b/diags/homerun.c
@@ -274,8 +274,7 @@ hr_report_faults_to_svclog(int fd, struct dev_vpd *vpd,
build_srn(srn, SRN_RC_TEMP_THRESHOLD);
callouts = NULL;
create_esm_callout(&callouts, location, i, fd);
- if (rc == 0)
- servevent(srn, sev, description, vpd, callouts);
+ servevent(srn, sev, description, vpd, callouts);
}
/* ESM electronics */
diff --git a/rtas_errd/dump.c b/rtas_errd/dump.c
index 6f8e2dc..237def4 100644
--- a/rtas_errd/dump.c
+++ b/rtas_errd/dump.c
@@ -315,7 +315,12 @@ check_platform_dump(struct event *event)
setup_sigchld_handler();
return;
}
- fgets(filename, DUMP_MAX_FNAME_LEN + 20, f);
+ if (!fgets(filename, DUMP_MAX_FNAME_LEN + 20, f)) {
+ dbg("Failed to collect filename info");
+ spclose(f, cpid);
+ setup_sigchld_handler();
+ return;
+ }
rc = spclose(f, cpid);
setup_sigchld_handler();
diff --git a/rtas_errd/ela.c b/rtas_errd/ela.c
index d9bfcc3..939f3ce 100644
--- a/rtas_errd/ela.c
+++ b/rtas_errd/ela.c
@@ -1922,7 +1922,7 @@ process_v2_epow(struct event *event, int error_type)
{
int rc = 1;
int class;
- int *reg, rlen, ext_epow;
+ int *reg, rlen, ext_epow = 0;
class = error_type & 0xFF;