[PATCH phosphor-host-ipmid 1/7] Remove unused variables and labels
OpenBMC Patches
openbmc-patches at stwcx.xyz
Wed Nov 25 18:10:18 AEDT 2015
From: Joel Stanley <joel at jms.id.au>
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
ipmid.C | 6 ++----
storageaddsel.C | 4 +---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/ipmid.C b/ipmid.C
index 440705c..f1f938c 100644
--- a/ipmid.C
+++ b/ipmid.C
@@ -233,7 +233,6 @@ static int send_ipmi_message(sd_bus_message *req, unsigned char seq, unsigned ch
static int handle_ipmi_command(sd_bus_message *m, void *user_data, sd_bus_error
*ret_error) {
int r = 0;
- const char *msg = NULL;
unsigned char sequence, netfn, lun, cmd;
const void *request;
size_t sz;
@@ -375,7 +374,6 @@ int main(int argc, char *argv[])
{
sd_bus_slot *slot = NULL;
int r;
- char *mode = NULL;
unsigned long tvalue;
int c;
@@ -458,7 +456,7 @@ finish:
// step for mapping IPMI
int find_interface_property_fru_type(dbus_interface_t *interface, const char *property_name, char *property_value) {
- char *str1, *str2, *str3;
+ char *str1;
sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus_message *reply = NULL, *m=NULL;
@@ -604,7 +602,7 @@ int set_sensor_dbus_state_v(uint8_t number, const char *method, char *value) {
dbus_interface_t a;
int r;
sd_bus_error error = SD_BUS_ERROR_NULL;
- sd_bus_message *reply = NULL, *m=NULL;
+ sd_bus_message *m=NULL;
fprintf(ipmidbus, "Attempting to set a dbus Variant Sensor 0x%02x via %s with a value of %s\n",
number, method, value);
diff --git a/storageaddsel.C b/storageaddsel.C
index 64b0e6a..345dfd5 100644
--- a/storageaddsel.C
+++ b/storageaddsel.C
@@ -136,7 +136,6 @@ int create_esel_description(const uint8_t *buffer, const char *sev, char **messa
ipmi_add_sel_request_t *p;
- int r;
char *m;
p = ( ipmi_add_sel_request_t *) buffer;
@@ -197,7 +196,6 @@ int send_esel_to_dbus(const char *desc, const char *sev, const char *details, ui
r = *pty;
}
-finish:
sd_bus_error_free(&error);
sd_bus_message_unref(m);
sd_bus_message_unref(reply);
@@ -207,7 +205,7 @@ finish:
void send_esel(uint16_t recordid) {
- char *desc, *assoc, *ascii;
+ char *desc, *assoc;
const char *sev;
uint8_t *buffer = NULL;
char *path, *pathsent;
--
2.6.3
More information about the openbmc
mailing list