mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID:355 - Fix compiler warnings
Commit removes all unused variables reported by compiler.
This commit is contained in:
parent
6febd10121
commit
33f9336e85
@ -494,7 +494,6 @@ ipmi_dcmi_prnt_oobDiscover(struct ipmi_intf * intf)
|
||||
"DCMI Discovery is available only when LANplus(IPMI v2.0) is enabled.");
|
||||
return (-1);
|
||||
# else
|
||||
int rc;
|
||||
struct ipmi_session *s;
|
||||
|
||||
if (intf->opened == 0 && intf->open != NULL) {
|
||||
@ -552,8 +551,6 @@ ipmi_dcmi_prnt_oobDiscover(struct ipmi_intf * intf)
|
||||
static int
|
||||
ipmi_dcmi_prnt_getcapabilities(struct ipmi_intf * intf, uint8_t selector)
|
||||
{
|
||||
uint8_t i;
|
||||
uint8_t bit_shifter = 0;
|
||||
struct capabilities cape;
|
||||
struct ipmi_rs * rsp;
|
||||
rsp = ipmi_dcmi_getcapabilities(intf, selector);
|
||||
@ -728,7 +725,6 @@ ipmi_dcmi_getassettag(struct ipmi_intf * intf, uint8_t offset, uint8_t length)
|
||||
static int
|
||||
ipmi_dcmi_prnt_getassettag(struct ipmi_intf * intf)
|
||||
{
|
||||
uint8_t data_byte2;
|
||||
struct ipmi_rs * rsp; /* ipmi response */
|
||||
uint8_t taglength = 0;
|
||||
uint8_t getlength = 0;
|
||||
@ -800,7 +796,6 @@ ipmi_dcmi_setassettag(struct ipmi_intf * intf, uint8_t offset, uint8_t length,
|
||||
static int
|
||||
ipmi_dcmi_prnt_setassettag(struct ipmi_intf * intf, uint8_t * data)
|
||||
{
|
||||
uint8_t data_byte2;
|
||||
struct ipmi_rs * rsp; /* ipmi response */
|
||||
uint8_t tmpData[DCMI_MAX_BYTE_SIZE];
|
||||
uint8_t taglength = 0;
|
||||
@ -864,7 +859,6 @@ ipmi_dcmi_getmngctrlids(struct ipmi_intf * intf, uint8_t offset, uint8_t length)
|
||||
static int
|
||||
ipmi_dcmi_prnt_getmngctrlids(struct ipmi_intf * intf)
|
||||
{
|
||||
uint8_t data_byte2;
|
||||
struct ipmi_rs * rsp; /* ipmi response */
|
||||
uint8_t taglength = 0;
|
||||
uint8_t getlength = 0;
|
||||
@ -942,7 +936,6 @@ ipmi_dcmi_setmngctrlids(struct ipmi_intf * intf, uint8_t offset, uint8_t length,
|
||||
static int
|
||||
ipmi_dcmi_prnt_setmngctrlids(struct ipmi_intf * intf, uint8_t * data)
|
||||
{
|
||||
uint8_t data_byte2;
|
||||
struct ipmi_rs * rsp; /* ipmi response */
|
||||
uint8_t tmpData[DCMI_MAX_BYTE_SIZE];
|
||||
uint8_t taglength = 0;
|
||||
@ -1496,7 +1489,6 @@ ipmi_dcmi_pwr_slimit(struct ipmi_intf * intf, const char * option,
|
||||
struct power_limit val;
|
||||
uint8_t msg_data[15]; /* number of request data bytes */
|
||||
uint32_t lvalue = 0;
|
||||
int i;
|
||||
|
||||
rsp = ipmi_dcmi_pwr_glimit(intf); /* get the power limit settings */
|
||||
# if 0
|
||||
@ -1741,8 +1733,7 @@ int
|
||||
ipmi_dcmi_main(struct ipmi_intf * intf, int argc, char **argv)
|
||||
{
|
||||
int rc = 0;
|
||||
uint8_t ctl = 0;
|
||||
int i, ii, instances;
|
||||
int i;
|
||||
struct ipmi_rs *rsp;
|
||||
|
||||
if ((argc == 0) || (strncmp(argv[0], "help", 4) == 0)) {
|
||||
|
@ -589,7 +589,6 @@ int
|
||||
ipmi_lcd_get_platform_model_name(struct ipmi_intf * intf, char* lcdstring,
|
||||
uint8_t max_length, uint8_t field_type)
|
||||
{
|
||||
uint8_t data[4];
|
||||
int bytes_copied = 0;
|
||||
int ii = 0;
|
||||
int lcdstring_len = 0;
|
||||
@ -706,7 +705,6 @@ ipmi_idracvalidator_command(struct ipmi_intf * intf)
|
||||
static int
|
||||
ipmi_lcd_get_configure_command_wh(struct ipmi_intf * intf)
|
||||
{
|
||||
uint8_t data[4];
|
||||
int rc;
|
||||
rc = ipmi_mc_getsysinfo(intf, IPMI_DELL_LCD_CONFIG_SELECTOR, 0, 0,
|
||||
sizeof(lcd_mode), &lcd_mode);
|
||||
@ -2061,7 +2059,6 @@ get_nic_selection_mode_12g(struct ipmi_intf* intf,int current_arg,
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
int failover = 0;
|
||||
int nic_selection_mode = 0;
|
||||
uint8_t input_length = 0;
|
||||
uint8_t msg_data[30];
|
||||
|
||||
@ -2224,7 +2221,6 @@ get_nic_selection_mode_12g(struct ipmi_intf* intf,int current_arg,
|
||||
static int
|
||||
get_nic_selection_mode(int current_arg, char ** argv)
|
||||
{
|
||||
int nic_selection_mode = 0;
|
||||
if (argv[current_arg] != NULL
|
||||
&& strncmp(argv[current_arg], "dedicated\0", 10) == 0) {
|
||||
return DEDICATED;
|
||||
@ -3561,7 +3557,6 @@ ipmi_print_power_consmpt_history(struct ipmi_intf * intf, int unit)
|
||||
static int
|
||||
ipmi_get_power_cap(struct ipmi_intf * intf, IPMI_POWER_CAP * ipmipowercap)
|
||||
{
|
||||
uint64_t tempbtuphrconv;
|
||||
uint8_t *rdata;
|
||||
int rc;
|
||||
rc = ipmi_mc_getsysinfo(intf, IPMI_DELL_POWER_CAP, 0, 0,
|
||||
|
@ -399,7 +399,6 @@ ipmi_ekanalyzer_usage(void)
|
||||
static int
|
||||
ipmi_ek_get_file_type(char *argument)
|
||||
{
|
||||
int index_name=0;
|
||||
int filetype = ERROR_STATUS;
|
||||
if (strlen(argument) <= MIN_ARGUMENT) {
|
||||
return filetype;
|
||||
|
@ -1564,8 +1564,6 @@ static void ipmi_fru_oemkontron_get( int argc, char ** argv,uint8_t * fru_data,
|
||||
static int badParams=FALSE;
|
||||
int start = off;
|
||||
int offset = start;
|
||||
int length = len;
|
||||
int i;
|
||||
offset += sizeof(struct fru_multirec_oem_header);
|
||||
|
||||
if(!badParams){
|
||||
@ -2147,7 +2145,6 @@ static void ipmi_fru_picmg_ext_print(uint8_t * fru_data, int off, int length)
|
||||
{
|
||||
unsigned int entries;
|
||||
unsigned int feeds;
|
||||
unsigned int feedcnt;
|
||||
unsigned int hwaddr;
|
||||
unsigned int i;
|
||||
unsigned int id;
|
||||
@ -4850,8 +4847,6 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
|
||||
struct fru_info fru, struct fru_header header,
|
||||
uint8_t f_type, uint8_t f_index, char *f_string)
|
||||
{
|
||||
uint8_t msg_data[4];
|
||||
uint8_t checksum;
|
||||
int i = 0;
|
||||
uint8_t *fru_data_old = NULL;
|
||||
uint8_t *fru_data_new = NULL;
|
||||
|
@ -858,7 +858,6 @@ KfwumUploadFirmware(struct ipmi_intf *intf, unsigned char *pBuffer,
|
||||
unsigned long lastAddress = 0;
|
||||
unsigned char sequenceNumber = 0;
|
||||
unsigned char retry = FWUM_MAX_UPLOAD_RETRY;
|
||||
unsigned char isLengthValid = 1;
|
||||
do {
|
||||
writeSize = save_fw_nfo.bufferSize - save_fw_nfo.overheadSize;
|
||||
/* Reach the end */
|
||||
|
@ -998,7 +998,6 @@ HpmfwupgUpgradeStage(struct ipmi_intf *intf,
|
||||
unsigned char *pImagePtr;
|
||||
unsigned int actionsSize;
|
||||
int flagColdReset = FALSE;
|
||||
time_t start,end;
|
||||
/* Put pointer after image header */
|
||||
pImagePtr = (unsigned char*)
|
||||
(pFwupgCtx->pImageData + sizeof(struct HpmfwupgImageHeader) +
|
||||
@ -1869,7 +1868,6 @@ HpmfwupgGetUpgradeStatus(struct ipmi_intf *intf,
|
||||
struct HpmfwupgUpgradeCtx *pFwupgCtx,
|
||||
int silent)
|
||||
{
|
||||
int rc = HPMFWUPG_SUCCESS;
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
pCtx->req.picmgId = HPMFWUPG_PICMG_IDENTIFIER;
|
||||
|
@ -431,7 +431,6 @@ static int ImeUpgrade(struct ipmi_intf *intf, char* imageFilename)
|
||||
if(currentPercent != shownPercent)
|
||||
{
|
||||
uint16_t timeElapsedSecond;
|
||||
uint16_t timeRemainingSecond;
|
||||
shownPercent = currentPercent;
|
||||
printf("Percent: %02i, ", shownPercent);
|
||||
time(¤t);
|
||||
@ -965,8 +964,6 @@ static int ImeManualRollback(struct ipmi_intf *intf)
|
||||
{
|
||||
int rc = IME_SUCCESS;
|
||||
tImeStatus imeStatus;
|
||||
time_t start,end,current;
|
||||
|
||||
|
||||
rc = ImeUpdateRegisterUpdate(intf, IME_UPDTYPE_MANUAL_ROLLBACK);
|
||||
ImeUpdateGetStatus(intf,&imeStatus);
|
||||
|
@ -413,7 +413,6 @@ ipmi_isol_deactivate(struct ipmi_intf * intf)
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t data[6];
|
||||
struct isol_config_parameters params;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_ISOL;
|
||||
|
@ -176,7 +176,6 @@ ipmi_kontronoem_send_set_large_buffer(struct ipmi_intf *intf,
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[2];
|
||||
int i;
|
||||
memset(msg_data, 0, sizeof(msg_data));
|
||||
/* channel =~ 0x0e => Currently running interface */
|
||||
msg_data[0] = channel;
|
||||
|
@ -512,7 +512,6 @@ int ipmi_parse_range_list(const char *rangeList, unsigned char * pHexList)
|
||||
int
|
||||
ipmi_sdr_add_from_list(struct ipmi_intf *intf, const char *rangeList)
|
||||
{
|
||||
int i;
|
||||
int rc = 0;
|
||||
int slave_addr;
|
||||
int myaddr = intf->target_addr;
|
||||
@ -575,7 +574,6 @@ ipmi_sdr_add_from_list(struct ipmi_intf *intf, const char *rangeList)
|
||||
static int
|
||||
ipmi_sdr_read_records(const char *filename, struct sdrr_queue *queue)
|
||||
{
|
||||
struct sdr_get_rs header;
|
||||
int rc = 0;
|
||||
int fd;
|
||||
uint8_t binHdr[5];
|
||||
|
@ -531,7 +531,6 @@ get_supermicro_evt_desc(struct ipmi_intf *intf, struct sel_event_record *rec)
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
char *desc = NULL;
|
||||
char *str;
|
||||
int chipset_type = 1;
|
||||
int data1;
|
||||
int data2;
|
||||
@ -651,17 +650,13 @@ char * get_dell_evt_desc(struct ipmi_intf * intf, struct sel_event_record * rec)
|
||||
|
||||
unsigned char count;
|
||||
unsigned char node;
|
||||
unsigned char num;
|
||||
unsigned char dimmNum;
|
||||
unsigned char dimmsPerNode;
|
||||
char dimmStr[MAX_DIMM_STR];
|
||||
char cardStr[MAX_CARD_STR];
|
||||
char numStr[MAX_CARDNO_STR];
|
||||
char tmpdesc[SIZE_OF_DESC];
|
||||
char* str;
|
||||
unsigned char incr = 0;
|
||||
unsigned char i=0,j = 0;
|
||||
unsigned char postCode;
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
char tmpData;
|
||||
|
@ -160,7 +160,6 @@ ipmi_sensor_print_fc_discrete(struct ipmi_intf *intf,
|
||||
struct sdr_record_common_sensor *sensor,
|
||||
uint8_t sdr_record_type)
|
||||
{
|
||||
const char *id;
|
||||
struct sensor_reading *sr;
|
||||
|
||||
sr = ipmi_sdr_read_sensor_value(intf, sensor, sdr_record_type, 3);
|
||||
|
@ -361,7 +361,6 @@ ipmi_intf_socket_connect(struct ipmi_intf * intf)
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *rp0 = NULL, *rp;
|
||||
char service[NI_MAXSERV];
|
||||
int rc;
|
||||
|
||||
if (!intf || intf->session == NULL) {
|
||||
return -1;
|
||||
|
@ -377,8 +377,6 @@ ipmi_openipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
}
|
||||
|
||||
if(intf->transit_addr != 0 && intf->transit_addr != intf->my_addr) {
|
||||
uint8_t index = 0;
|
||||
|
||||
/* ipmb_addr.transit_slave_addr = intf->transit_addr; */
|
||||
lprintf(LOG_DEBUG, "Decapsulating data received from transit "
|
||||
"IPMB target @ 0x%x", intf->transit_addr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user