On Mon, Apr 1, 2013 at 2:51 PM, Jim Mankovich <jm...@hp.com> wrote:
> Dan,
>
> Without this compile flag, there are many warning messages with the new gcc
> versions.

Are there?  I just compiled it without -Wno-unused-result with gcc
4.6.2 and I only see three warnings:

../../lib -I.. -I../../include    -g -O2 -fno-strict-aliasing
-Wreturn-type -MT ipmi_fwum.lo -MD -MP -MF .deps/ipmi_fwum.Tpo -c -o
ipmi_fwum.lo ../../lib/ipmi_fwum.c
../../lib/ipmi_fwum.c: In function 'KfwumGetFileSize':
../../lib/ipmi_fwum.c:482:47: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]

/bin/sh ../libtool --silent --tag=CC   --mode=compile gcc
-DHAVE_CONFIG_H -I. -I../../lib -I.. -I../../include    -g -O2
-fno-strict-aliasing -Wreturn-type -MT ipmi_dcmi.lo -MD -MP -MF
.deps/ipmi_dcmi.Tpo -c -o ipmi_dcmi.lo ../../lib/ipmi_dcmi.c
../../lib/ipmi_dcmi.c: In function 'ipmi_dcmi_prnt_oobDiscover':
../../lib/ipmi_dcmi.c:457:20: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]

/bin/sh ../../../libtool --silent --tag=CC   --mode=compile gcc
-DHAVE_CONFIG_H -I. -I../../../../src/plugins/imb -I../../..
-I../../../../include    -g -O2 -fno-strict-aliasing -Wreturn-type -MT
imbapi.lo -MD -MP -MF .deps/imbapi.Tpo -c -o imbapi.lo
../../../../src/plugins/imb/imbapi.c
../../../../src/plugins/imb/imbapi.c: In function 'MapPhysicalMemory':
../../../../src/plugins/imb/imbapi.c:1971:23: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]

None of these would go away with -Wno-unused-result.

> Would it be possible to instead change configure.in to determine if the
> installed gcc version
> supports -Wno-unused-result?

I think that it would be much better to fix the warnings rather than
to hide them.  Especially since the -Wno-packed-bitfield-compat flag
was hiding serious bugs..

> I have found that people don't notice new compile time warnings that crop up
> due to their
> changes when files are already emitting warnings.

I agree, but I think that it's better to fix the warnings if at all
possible. Of course adding -Werror would force people to deal with
their warnings.

> I'd really like to see
> ipmitool compile
> cleanly with recent versions of gcc, and of course with older versions if
> possible as well.

Agreed, but it seems to compile pretty cleanly for me on x64 with gcc
4.6.2 and on Cavium MIPS64:

dg:speedy:build(master) => gcc --version
gcc (SUSE Linux) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

dg:speedy:debian(master) => mips64-octeon-linux-gnu-gcc --version
mips64-octeon-linux-gnu-gcc (Cavium Inc. Version: 2_3_0 build 128) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

thanks
dan

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to