Hello, 

The attached patch fixes warnings that appear in the compilation of the 
1.8.9 ipmitool release.

Please apply.

-- 
Dan Aloni
XIV LTD, http://www.xivstorage.com
da-x (at) monatomic.org, dan (at) xiv.co.il
diff --git a/lib/ipmi_chassis.c b/lib/ipmi_chassis.c
index b1a9e69..c917b72 100644
--- a/lib/ipmi_chassis.c
+++ b/lib/ipmi_chassis.c
@@ -900,8 +900,6 @@ ipmi_chassis_main(struct ipmi_intf * intf, int argc, char 
** argv)
                                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;
diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c
index e9df6ba..86749d9 100644
--- a/lib/ipmi_fru.c
+++ b/lib/ipmi_fru.c
@@ -845,7 +845,7 @@ int ipmi_fru_query_new_value(uint8_t *data,int offset, 
size_t len)
       unsigned int *holder;
 
       holder = malloc(len);
-      printf("Enter hex values for each of the %d entries (lsb first),"   \
+      printf("Enter hex values for each of the %zd entries (lsb first),"   \
              " hit <enter> between entries\n",len);
 
       /* I can't assign scanf' %x into a single char */
@@ -1605,10 +1605,7 @@ ipmi_fru_edit_multirec(struct ipmi_intf * intf, uint8_t 
id)
        uint16_t retStatus = 0;
        uint32_t offFruMultiRec;
        uint32_t fruMultiRecSize = 0;
-       uint32_t offFileMultiRec = 0;
-       uint32_t fileMultiRecSize = 0;
        struct fru_info fruInfo;
-       uint8_t *buf = NULL;
        retStatus = ipmi_fru_get_multirec_location_from_fru(intf, id, &fruInfo,
                                                            &offFruMultiRec,
                                                            &fruMultiRecSize);
@@ -1671,7 +1668,7 @@ ipmi_fru_edit_multirec(struct ipmi_intf * intf, uint8_t 
id)
       fru_data = malloc(fru.size + 1);
       if (fru_data == NULL) {
          lprintf(LOG_ERR, " Out of memory!");
-         return;
+         return -1;
       }
       memset(fru_data, 0, fru.size + 1);
 
diff --git a/lib/ipmi_fwum.c b/lib/ipmi_fwum.c
index f7dec96..ec12d2d 100644
--- a/lib/ipmi_fwum.c
+++ b/lib/ipmi_fwum.c
@@ -1245,7 +1245,6 @@ static tKFWUM_Status KfwumUploadFirmware(struct ipmi_intf 
* intf,
    unsigned long lastAddress = 0;
    unsigned char sequenceNumber = 0;
    unsigned char retry = FWUM_MAX_UPLOAD_RETRY;
-   unsigned char isLengthValid = 1;
 
    do
    {
diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c
index b6bb97b..b58061a 100644
--- a/lib/ipmi_hpmfwupg.c
+++ b/lib/ipmi_hpmfwupg.c
@@ -38,10 +38,11 @@
 #include <ipmitool/log.h>
 #include "../src/plugins/lan/md5.h"
 #include <stdio.h>
+#include <unistd.h>
 #include <time.h>
 
-#if HAVE_CONFIG_H
-  #include <config.h>
+#if HAVE_CONFIG_H
+  #include <config.h>
 #endif
 
 /****************************************************************************
@@ -696,10 +697,6 @@ static int HpmfwupgPrepareComponents(struct ipmi_intf 
*intf,
                                      struct HpmfwupgPrepareComponentsCtx* pCtx,
                                      struct HpmfwupgUpgradeCtx* pFwupgCtx);  
                             
-static int HpmfwupgBackupComponents(struct ipmi_intf *intf, 
-                                    struct HpmfwupgBackupComponentsCtx* pCtx,
-                                    struct HpmfwupgUpgradeCtx* pFwupgCtx);    
-                                                                      
 static int HpmfwupgUploadFirmwareBlock(struct ipmi_intf *intf, 
                                        struct HpmfwupgUploadFirmwareBlockCtx* 
pCtx, 
                                        struct HpmfwupgUpgradeCtx* pFwupgCtx, 
int count);
@@ -736,7 +733,6 @@ static struct ipmi_rs *  HpmfwupgSendCmd(struct ipmi_intf 
*intf, struct ipmi_rq
 int HpmfwupgUpgrade(struct ipmi_intf *intf, char* imageFilename, int activate)
 {
    int rc = HPMFWUPG_SUCCESS;
-   struct HpmfwupgImageHeader imageHeader;
    struct HpmfwupgUpgradeCtx  fwupgCtx;
    
    /*
@@ -944,8 +940,6 @@ int HpmfwupgPreparationStage(struct ipmi_intf *intf, struct 
HpmfwupgUpgradeCtx*
    /* Get target upgrade capabilities */
    if ( rc == HPMFWUPG_SUCCESS )
    {
-      struct HpmfwupgGetTargetUpgCapabilitiesCtx targetCapCmd;
-   
       rc = HpmfwupgGetTargetUpgCapabilities(intf, &pFwupgCtx->targetCap);
       
       if ( rc == HPMFWUPG_SUCCESS )
@@ -1598,44 +1592,6 @@ int HpmfwupgPrepareComponents(struct ipmi_intf *intf, 
struct HpmfwupgPrepareComp
    return rc;
 } 
 
-int HpmfwupgBackupComponents(struct ipmi_intf *intf, struct 
HpmfwupgBackupComponentsCtx* pCtx,
-                             struct HpmfwupgUpgradeCtx* pFwupgCtx) 
-{
-   int    rc = HPMFWUPG_SUCCESS;
-   struct ipmi_rs * rsp;
-   struct ipmi_rq   req;
-   
-   pCtx->req.picmgId = HPMFWUPG_PICMG_IDENTIFIER;
-   
-   memset(&req, 0, sizeof(req));
-   req.msg.netfn    = IPMI_NETFN_PICMG;
-       req.msg.cmd      = HPMFWUPG_BACKUP_COMPONENTS;
-       req.msg.data     = (unsigned char*)&pCtx->req;
-       req.msg.data_len = sizeof(struct HpmfwupgBackupComponentsReq);
-      
-   rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); 
-   
-   if ( rsp )
-   {
-      /* Long duration command handling */
-      if ( rsp->ccode == HPMFWUPG_COMMAND_IN_PROGRESS )
-      {
-         rc = HpmfwupgWaitLongDurationCmd(intf, pFwupgCtx);
-      }
-      else if ( rsp->ccode != 0x00 )
-      {
-         lprintf(LOG_NOTICE,"Error backuping components, compcode = %x\n",  
rsp->ccode);
-         rc = HPMFWUPG_ERROR;
-      }
-   }
-   else
-   {
-      lprintf(LOG_NOTICE,"Error backuping component\n");
-      rc = HPMFWUPG_ERROR;
-   }
-   return rc;
-}                               
-
 int HpmfwupgUploadFirmwareBlock(struct ipmi_intf *intf, struct 
HpmfwupgUploadFirmwareBlockCtx* pCtx, 
                                 struct HpmfwupgUpgradeCtx* pFwupgCtx, int 
count)
 {
diff --git a/lib/ipmi_picmg.c b/lib/ipmi_picmg.c
index 0214222..038cae9 100644
--- a/lib/ipmi_picmg.c
+++ b/lib/ipmi_picmg.c
@@ -292,11 +292,11 @@ ipmi_picmg_portstate_get(struct ipmi_intf * intf, int 
interface,int channel,
          }
          else if (d->type >= 0x06 && d->type <= 0xef)
          {
-            printf("Reserved\n",d->type);
+            printf("Reserved\n");
          }
          else if (d->type >= 0xf0 && d->type <= 0xfe)
          {
-            printf("OEM GUID Definition\n",d->type);
+            printf("OEM GUID Definition\n");
          }
          else
          {
diff --git a/src/plugins/bmc/bmc_intf.h b/src/plugins/bmc/bmc_intf.h
index c73e4c1..03bd80e 100644
--- a/src/plugins/bmc/bmc_intf.h
+++ b/src/plugins/bmc/bmc_intf.h
@@ -33,7 +33,6 @@
 #ifndef _BMC_INTF_H
 #define        _BMC_INTF_H
 
-#pragma ident  "@(#)bmc_intf.h 1.2     05/03/07 SMI"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/src/plugins/imb/imbapi.c b/src/plugins/imb/imbapi.c
index 6ccf442..178f49a 100644
--- a/src/plugins/imb/imbapi.c
+++ b/src/plugins/imb/imbapi.c
@@ -265,7 +265,7 @@ int open_imb(void)
                        DEBUG("%s: opened driver, getting IPMI version\n", 
__FUNCTION__);
 #endif
                        if ( ((my_ret_code = SendTimedImbpRequest(&requestData, 
(DWORD)400,
-                                                respBuffer, (int 
*)&respLength, &completionCode)
+                                                                 respBuffer, 
(int *)(void *)&respLength, &completionCode)
                                                )  != ACCESN_OK ) || ( 
completionCode != 0) )
                        {
                                printf("%s: SendTimedImbpRequest error. Ret = 
%d CC = 0x%X\n",
@@ -1541,7 +1541,7 @@ IsAsyncMessageAvailable (unsigned int   eventId )
                                    sizeof(HANDLE ),
                                    &dummy,
                                        sizeof(int),
-                                       (LPDWORD) & respLength,
+                                       (LPDWORD) (void *)& respLength,
                                        NULL
                                  );
 #ifndef NO_MACRO_ARGS
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to