Patch 4: Fix warnings in ipmi_fwum.c

On Mon, Apr 29, 2013 at 9:01 PM, Dan Gora <d...@adax.com> wrote:
> Hi All,
>
> Following are 5 patches to fix the compilation warnings which appear
> in newer gcc versions (gcc 4.7.2 currently only seen in Ububtu 12.10
> AFAIK) when -Wno-unused-return is removed from the compilation flags.
>
> -Wno-unused-return basically _has_ to come out.  A few compilation
> warnings are better than having the compilation just fail with older
> gcc versions.  Hopefully these patches will fix the compilation
> warnings to everyone's satisfaction.
>
> thanks
> dan
From 9db66d3023e8db75d2eb40a52fb4b8e1eac72082 Mon Sep 17 00:00:00 2001
From: Dan Gora <d...@adax.com>
Date: Tue, 2 Apr 2013 17:21:08 -0300
Subject: [PATCH 4/6] Fixed compilation warning in lib/ipmi_fwum.c

Fixed silly error where the return from fseek was compared to (unsigned
int) NULL, which makes no sense at all.
---
 ipmitool/lib/ipmi_fwum.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipmitool/lib/ipmi_fwum.c b/ipmitool/lib/ipmi_fwum.c
index 78a18ee..55d011d 100644
--- a/ipmitool/lib/ipmi_fwum.c
+++ b/ipmitool/lib/ipmi_fwum.c
@@ -479,9 +479,9 @@ static tKFWUM_Status KfwumGetFileSize(unsigned char * 
pFileName,
 
    if(pFileHandle)
    {
-      if(fseek(pFileHandle, 0L , SEEK_END) == (unsigned int) NULL)
+      if(fseek(pFileHandle, 0L , SEEK_END) == 0)
       {
-         *pFileSize     =    ftell(pFileHandle);
+         *pFileSize = ftell(pFileHandle);
 
          if( *pFileSize != 0)
          {
-- 
1.7.11

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to