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