ppc64-diag/ppc64-diag-unusedvar.patch
Vasant Hegde 4c48fe78e0 Update to latest upstream 2.6.10
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2015-11-16 20:24:04 +05:30

122 lines
3.4 KiB
Diff

From 41e153fc9dbd4a9dc5046f3200e1d06b32e640fc Mon Sep 17 00:00:00 2001
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date: Mon, 16 Nov 2015 20:21:57 +0530
Subject: [PATCH] Add unused attribute
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
diags/7031_D24_T24.c | 9 ++++++---
rtas_errd/ela.c | 2 +-
rtas_errd/epow.c | 6 +++---
rtas_errd/files.c | 2 +-
rtas_errd/guard.c | 2 +-
5 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/diags/7031_D24_T24.c b/diags/7031_D24_T24.c
index 8e1d47f..3a9e88e 100644
--- a/diags/7031_D24_T24.c
+++ b/diags/7031_D24_T24.c
@@ -73,7 +73,8 @@ get_enclosure_scsi_id(struct pearl_diag_page2 *dp)
static int
pearl_print_drive_status(uint32_t status)
{
- int fail = 0, printed = 0, rc = OK;
+ __attribute__((unused)) int fail = 0;
+ int printed = 0, rc = OK;
if ((status & 0x0F000000) == 0x05000000) {
printf("(empty) ");
@@ -171,7 +172,8 @@ print_ps_fan_status(uint32_t status)
static int
print_repeater_status(uint32_t status)
{
- int printed = 0, fail = 0, rc = OK;
+ int printed = 0, rc = OK;
+ __attribute__((unused)) int fail = 0;
if ((status & 0x0F000000) == 0x01000000)
printf("ok ");
@@ -355,7 +357,8 @@ int
diag_7031_D24_T24(int fd, struct dev_vpd *vpd)
{
struct pearl_diag_page2 dp;
- int failure = 0, rc, encl_id;
+ int failure = 0, encl_id;
+ __attribute__((unused)) int rc;
int buf_len = sizeof(dp);
int ps1, ps2, fan1, fan2, fan3, rpt, vpd_card;
diff --git a/rtas_errd/ela.c b/rtas_errd/ela.c
index 26085e9..b0c064c 100644
--- a/rtas_errd/ela.c
+++ b/rtas_errd/ela.c
@@ -1823,7 +1823,7 @@ process_v1_epow(struct event *event, int error_type)
int class;
int ext_epow;
int ext_epow_nofan;
- int fan_num;
+ __attribute__((unused)) int fan_num;
/*
* The following EPOW error logs found in CHRP, Ver. 1
diff --git a/rtas_errd/epow.c b/rtas_errd/epow.c
index 8e020d6..78c1b9e 100644
--- a/rtas_errd/epow.c
+++ b/rtas_errd/epow.c
@@ -48,7 +48,7 @@ static int time_remaining = 0;
void
epow_timer_handler(int sig, siginfo_t siginfo, void *context)
{
- int rc, state;
+ int __attribute__((unused)) rc, state;
struct itimerval tv;
if (time_remaining <= 0) {
@@ -149,7 +149,7 @@ parse_epow(struct event *event)
struct rtas_epow_scn *epow;
struct itimerval tv;
char *event_type;
- int rc, state;
+ int __attribute__((unused)) rc, state;
/*
* Check the sensor state; this will be used to ensure
@@ -380,7 +380,7 @@ check_epow(struct event *event)
{
pid_t child;
char *childargs[2];
- int rc, current_status;
+ int __attribute__((unused)) rc, current_status;
/*
* Dissect the EPOW extended error information;
diff --git a/rtas_errd/files.c b/rtas_errd/files.c
index 6c9fe0c..3fe851e 100644
--- a/rtas_errd/files.c
+++ b/rtas_errd/files.c
@@ -162,7 +162,7 @@ setup_rtas_event_scenario(void)
{
struct stat sbuf;
char *tmp;
- int fd, len;
+ int fd, __attribute__((unused)) len;
int i;
if (scenario_file == NULL)
diff --git a/rtas_errd/guard.c b/rtas_errd/guard.c
index db264c0..bbd702a 100644
--- a/rtas_errd/guard.c
+++ b/rtas_errd/guard.c
@@ -41,7 +41,7 @@ run_drmgr(enum resource_dealloc_type resource_type, char *drc_name,
unsigned int value, int wait)
{
pid_t child;
- int status, rc;
+ int status, __attribute__((unused)) rc;
char capacity[6], quant_str[5];
char *drmgr_args[] = {DRMGR_PROGRAM_NOPATH, "-r", "-c", NULL,
NULL, NULL, NULL, NULL, NULL};
--
2.1.0