delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/03/02/17:05:57

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10203022206.AA21057@clio.rice.edu>
Subject: Re: Malloc/free DJGPP code
To: djgpp-workers AT delorie DOT com
Date: Sat, 2 Mar 2002 16:06:06 -0600 (CST)
In-Reply-To: <200203021743.SAA04889@father.ludd.luth.se> from "Martin Str|mberg" at Mar 02, 2002 06:43:31 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

It appears to be a warning issue (didn't build first time with warnings).  
I had to cast twice to get the message to go away.  Replaced

  brk((void *)( ((int)sbrk(0)+(ALIGN-1)) & ~(ALIGN-1) ));

with

  brk((void *)( (int)((char *)sbrk(0)+(ALIGN-1)) & ~(ALIGN-1) ));

This keeps the first cast a pointer, then I recast to integer so I
can do bit arithmetic, then cast back to make brk happy.

Still need to do a few more tests.  Sorry for the incomplete patch.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019