================================================================================ --- ipmitool-1.8.11/lib/ipmi_chassis.c +++ ipmitool-1.8.11/lib/ipmi_chassis.c @@ -714,14 +714,14 @@ printf(" Boot Initiator Info :\n"); printf(" Channel Number : %d\n", (rsp->data[2] & 0x0f)); - printf(" Session Id : %08Xh\n",session_id); + printf(" Session Id : %08lXh\n",session_id); if(timestamp != 0) { - printf(" Timestamp : %08Xh, %s\n",timestamp,time_buf); + printf(" Timestamp : %08lXh, %s\n",timestamp,time_buf); } else { - printf(" Timestamp : %08Xh, undefined\n",timestamp); + printf(" Timestamp : %08lXh, undefined\n",timestamp); } } @@ -1140,8 +1140,6 @@ memset(&flags[0], 0, sizeof(flags)); token = strtok_r(argv[2] + 8, ",", &saveptr); while (token != NULL) { - int i; - if (strcmp(token, "help") == 0) { optionError = 1; break; --- ipmitool-1.8.11/lib/ipmi_ekanalyzer.c +++ ipmitool-1.8.11/lib/ipmi_ekanalyzer.c @@ -395,7 +395,6 @@ static int ipmi_ek_get_file_type( char * argument ) { - int index_name=0; int filetype = ERROR_STATUS; if( strlen (argument) > MIN_ARGUMENT ){ @@ -1092,8 +1091,6 @@ } else{ int num_file=0; - int index_data = 0; - int first_data = 1; tboolean amc_file = FALSE; /*used to indicate the present of AMC file*/ tboolean oc_file = FALSE; /*used to indicate the present of Carrier file*/ @@ -1139,7 +1136,6 @@ struct ipmi_ek_multi_header * pcarrier_p2p; int list = 0; int match_pair = 0; - tboolean match_result = FALSE; /*Create an empty list*/ for ( list=0; listdata[offset++], - record->data[offset++], - record->data[offset++]); + record->data[offset+2], + record->data[offset+1], + record->data[offset+0]); + offset += 3; } } @@ -3148,21 +3149,24 @@ ipmi_ek_display_shelf_ip_connection_reco int offset = START_DATA_OFFSET; if (offset > record->header.len){ printf(" Shelf Manager IP Address: %d.%d.%d.%d\n", - record->data[offset++], record->data[offset++], - record->data[offset++], record->data[offset++] + record->data[offset+3], record->data[offset+2], + record->data[offset+1], record->data[offset+0] ); + offset += 4; } if (offset > record->header.len){ printf(" Default Gateway Address: %d.%d.%d.%d\n", - record->data[offset++], record->data[offset++], - record->data[offset++], record->data[offset++] + record->data[offset+3], record->data[offset+2], + record->data[offset+1], record->data[offset+0] ); + offset += 4; } if (offset > record->header.len){ - printf(" Subnet Mask: %d.%d.%d.%d\n", record->data[offset++], - record->data[offset++], record->data[offset++], - record->data[offset++] + printf(" Subnet Mask: %d.%d.%d.%d\n", + record->data[offset+3], record->data[offset+2], + record->data[offset+1], record->data[offset+0] ); + offset += 4; } } @@ -3250,11 +3246,11 @@ offset += sizeof(struct fru_picmgext_guid); } - for ( offset; + for ( ; offset < record->header.len; offset += sizeof(struct fru_picmgext_link_desc) ) { - /* to solve little endian /big endian problem */ + /* to solve little endian /big endian problem */ unsigned long data; struct fru_picmgext_link_desc * d; @@ -3419,7 +3415,7 @@ printf(" IPMB-0 Hub Descriptor Count: 0x%02x", record->data[offset++]); if (record->data[offset] > 0){ - for (offset; offset < record->header.len;){ + for (; offset < record->header.len;){ unsigned char entry_count = 0; printf(" IPMB-0 Hub Descriptor\n"); printf("\tHardware Address: 0x%02x\n", record->data[offset++]); @@ -3850,7 +3846,7 @@ (feature > 1) & 1, (feature&1)?"Source":"Receiver"); printf("\tFamily: 0x%02x - AccLVL: 0x%02x\n", family, accuracy); - printf("\tFRQ: %-9d - min: %-9d - max: %-9d\n", + printf("\tFRQ: %-9lu - min: %-9lu - max: %-9lu\n", freq, min_freq, max_freq); } printf("\n"); @@ -3903,7 +3899,7 @@ int record_count = 0; if ( verbose == LOG_DEBUG ){ - printf( "start multi offset = 0x%02x\n", multi_offset ); + printf( "start multi offset = 0x%02lx\n", multi_offset ); } /*the offset value is in multiple of 8 bytes.*/ multi_offset = multi_offset * 8; --- ipmitool-1.8.11/lib/ipmi_fwum.c +++ ipmitool-1.8.11/lib/ipmi_fwum.c @@ -480,7 +480,7 @@ if(pFileHandle) { - if(fseek(pFileHandle, 0L , SEEK_END) == (unsigned int) NULL) + if(fseek(pFileHandle, 0L , SEEK_END) == 0) { *pFileSize = ftell(pFileHandle); @@ -1307,7 +1307,6 @@ unsigned long lastAddress = 0; unsigned char sequenceNumber = 0; unsigned char retry = FWUM_MAX_UPLOAD_RETRY; - unsigned char isLengthValid = 1; do { Index: lib/ipmi_hpmfwupg.c =================================================================== --- ipmitool-1.8.10/lib/ipmi_hpmfwupg.c.orig 2008-10-14 17:50:09.000000000 +0200 +++ ipmitool-1.8.10/lib/ipmi_hpmfwupg.c 2008-10-14 18:06:44.000000000 +0200 @@ -40,6 +40,8 @@ #include "../src/plugins/lan/md5.h" #include #include +#include +#include #if HAVE_CONFIG_H #include @@ -877,7 +877,7 @@ void HpmDisplayUpgrade( int skip, unsign * Description: This function displays the information about version header * *****************************************************************************/ -int HpmDisplayVersionHeader(int mode) +void HpmDisplayVersionHeader(int mode) { if ( mode & IMAGE_VER) @@ -903,7 +903,7 @@ int HpmDisplayVersionHeader(int mode) * Description: This function displays the version of the image and target * *****************************************************************************/ -int HpmDisplayVersion(int mode,VERSIONINFO *pVersion) +void HpmDisplayVersion(int mode,VERSIONINFO *pVersion) { char descString[12]; memset(&descString,0x00,12); @@ -1218,7 +1218,6 @@ *****************************************************************************/ int HpmfwupgTargetCheck(struct ipmi_intf * intf, int option) { - struct HpmfwupgUpgradeCtx fwupgCtx; struct HpmfwupgGetTargetUpgCapabilitiesCtx targetCapCmd; int rc = HPMFWUPG_SUCCESS; int componentId = 0; @@ -1233,7 +1233,7 @@ int HpmfwupgTargetCheck(struct ipmi_intf if (rc != HPMFWUPG_SUCCESS) { lprintf(LOG_NOTICE,"Verify whether the Target board is present \n"); - return; + return rc; } rc = HpmfwupgGetTargetUpgCapabilities(intf, &targetCapCmd); @@ -1363,7 +1362,6 @@ int activate,int componentToUpload, int option) { int rc = HPMFWUPG_SUCCESS; - struct HpmfwupgImageHeader imageHeader; struct HpmfwupgUpgradeCtx fwupgCtx; /* @@ -1847,8 +1845,6 @@ unsigned char componentIdByte = 0x00; VERSIONINFO *pVersionInfo; - struct HpmfwupgGetComponentPropertiesCtx getCompProp; - /* Save component ID on which the upload is done */ componentIdByte = pActionRecord->components.ComponentBits.byte; while ((componentIdByte>>=1)!=0) @@ -2061,7 +2057,6 @@ struct HpmfwupgInitiateUpgradeActionCtx initUpgActionCmd; struct HpmfwupgUploadFirmwareBlockCtx uploadCmd; struct HpmfwupgFinishFirmwareUploadCtx finishCmd; - struct HpmfwupgGetComponentPropertiesCtx getCompProp; VERSIONINFO *pVersionInfo; unsigned char* pData, *pDataInitial; @@ -3257,7 +3257,7 @@ int ipmi_hpmfwupg_main(struct ipmi_intf if ( (argc == 0) || (strcmp(argv[0], "help") == 0) ) { HpmfwupgPrintUsage(); - return; + return rc; } if ( (strcmp(argv[0], "check") == 0) ) { --- ipmitool-1.8.11/lib/ipmi_isol.c +++ ipmitool-1.8.11/lib/ipmi_isol.c @@ -413,7 +413,6 @@ 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; --- ipmitool-1.8.11/lib/ipmi_picmg.c +++ ipmitool-1.8.11/lib/ipmi_picmg.c @@ -395,11 +395,11 @@ } else if (d->type >= 0x06 && d->type <= 0xef) { - printf("Reserved\n",d->type); + printf("Reserved %d\n",d->type); } else if (d->type >= 0xf0 && d->type <= 0xfe) { - printf("OEM GUID Definition\n",d->type); + printf("OEM GUID Definition %d\n",d->type); } else { @@ -471,7 +471,6 @@ struct ipmi_rq req; unsigned char msg_data[6]; - struct fru_picmgext_link_desc* d; memset(&req, 0, sizeof(req)); @@ -762,7 +761,7 @@ return -1; } - printf("LED Color Capabilities: ", rsp->data[1] ); + printf("LED Color Capabilities: "); for ( i=0 ; i<8 ; i++ ) { if ( rsp->data[1] & (0x01 << i) ) { printf("%s, ", led_color_str[ i ]); @@ -945,7 +944,6 @@ int ipmi_picmg_set_power_level(struct ipmi_intf * intf, int argc, char ** argv) { - int i; struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1020,7 +1018,6 @@ int ipmi_picmg_clk_get(struct ipmi_intf * intf, int argc, char ** argv) { - int i; struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1073,7 +1070,7 @@ printf(" - Index: %d\n", rsp->data[2]); printf(" - Family: %d\n", rsp->data[3]); printf(" - AccLVL: %d\n", rsp->data[4]); - printf(" - Freq: %d\n", freq); + printf(" - Freq: %lu\n", freq); } return 0; @@ -1083,7 +1080,6 @@ int ipmi_picmg_clk_set(struct ipmi_intf * intf, int argc, char ** argv) { - int i; struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1115,10 +1111,10 @@ #if 1 printf("## ID: %d\n", msg_data[1]); printf("## index: %d\n", msg_data[2]); -printf("## setting: 0x02x\n", msg_data[3]); +printf("## setting: %0x02x\n", msg_data[3]); printf("## family: %d\n", msg_data[4]); printf("## acc: %d\n", msg_data[5]); -printf("## freq: %d\n", freq ); +printf("## freq: %lu\n", freq ); printf("## res: %d\n", msg_data[10]); #endif @@ -1528,15 +1524,10 @@ else if (!strncmp(argv[0], "clk", 3)) { if (argc > 1) { if (!strncmp(argv[1], "get", 3)) { - if (argc > 2) { - unsigned char clk_id; - unsigned char clk_res; - + if (argc > 2) rc = ipmi_picmg_clk_get(intf, argc-1, &(argv[2])); - } else { printf("clk get []\n"); - return -1; } } --- ipmitool-1.8.11/lib/ipmi_sdr.c +++ ipmitool-1.8.11/lib/ipmi_sdr.c @@ -47,6 +47,7 @@ #include #include #include +#include #if HAVE_CONFIG_H # include Index: lib/ipmi_sdradd.c =================================================================== --- ipmitool-1.8.10/lib/ipmi_sdradd.c.orig 2007-07-11 16:27:46.000000000 +0200 +++ ipmitool-1.8.10/lib/ipmi_sdradd.c 2008-10-14 17:51:50.000000000 +0200 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -325,7 +325,6 @@ 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]; --- ipmitool-1.8.11/src/ipmievd.c +++ ipmitool-1.8.11/src/ipmievd.c @@ -665,6 +665,7 @@ } sleep(selwatch_timeout); } + return 0; } /*************************************************************************/ --- ipmitool-1.8.10/lib/ipmi_fru.c.orig 2008-06-10 23:40:47.000000000 +0200 +++ ipmitool-1.8.10/lib/ipmi_fru.c 2008-09-26 13:22:52.000000000 +0200 @@ -1259,7 +1259,8 @@ static void ipmi_fru_picmg_ext_print(uin for (i=0; ipayload.ipmi_response.rq_seq, rsp->payload.ipmi_response.cmd); ipmi_lan_poll_recv(intf); - return; + return 0; } else {