delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/31/07:32:06

From: Martin Stromberg <eplmst AT epl DOT ericsson DOT se>
Message-Id: <200205311055.MAA13084@lws256.lu.erisoft.se>
Subject: Re: Patches for building with gcc 3.1 - tests chunk
To: djgpp-workers AT delorie DOT com
Date: Fri, 31 May 2002 12:55:12 +0200 (MET DST)
In-Reply-To: <200205311022.MAA13060@lws256.lu.erisoft.se> from "Martin Stromberg" at May 31, 2002 12:22:56 PM
X-Mailer: ELM [version 2.5 PL3]
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

> 
> > > > -  urand = ((double)rand()) / RAND_MAX;
> > > > +  urand = ((double)(long)rand()) / RAND_MAX;
> 
> Well, it looks like that doesn't get rid of the warning either.

Sorry. I was compiling the wrong file.

Warning is generated by:
  urand = ((double)rand()) / RAND_MAX;
  urand = ((double)(rand())) / RAND_MAX;
  urand = ((double)(int)rand()) / RAND_MAX;
  urand = ((double)((int)rand())) / RAND_MAX;
 
But not by:
  urand = ((double)(long)rand()) / RAND_MAX;
  urand = ((double)((long)rand())) / RAND_MAX;


Right,

						MartinS

- Raw text -


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