Re: [PATCH 10/11] Fix warnings in nedmalloc when compiling with GCC 4.4.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 1 Jun 2009, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> >> > diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c
> >> > index a381a7d..60a4093 100644
> >> > --- a/compat/nedmalloc/nedmalloc.c
> >> > +++ b/compat/nedmalloc/nedmalloc.c
> >> > @@ -34,7 +34,7 @@ DEALINGS IN THE SOFTWARE.
> >> >  /*#define FULLSANITYCHECKS*/
> >> >  
> >> >  #include "nedmalloc.h"
> >> > -#if defined(WIN32) && !defined(__MINGW32__)
> >> > +#if defined(WIN32)
> >> >   #include <malloc.h>
> >> >  #endif
> >> 
> >> Can somebody enlighten me what this hunk is about, and how it helps GCC
> >> 4.4?
> >
> > It helps in that malloc.h is included even if we happen to compile the 
> > stuff as a MinGW program.  Otherwise necessary function declarations are 
> > missing.
> > ...
> > Hopefully less so, now.
> 
> I wish enough information were in the commit log message from the
> beginning.

Okay, how about this in the commit body in addition?

-- snip --
Nedmalloc's source code has a cute #define construct to avoid inserting
an if() statement, because that might interact badly with enclosing if()
statements.  However, there is no danger of that now, but GCC > 4
complains "warning: value computed is not used".

Also, with the version of MinGW's headers in msysGit, we need to include 
malloc.h lest the compiler complain about an "incompatible implicit 
declaration of built-in function 'alloca'".
-- snap --

Hmm?
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]