www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/10/27/10:49:24

Date: Sat, 27 Oct 2001 16:48:43 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Message-Id: <2950-Sat27Oct2001164840+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3BDA8B05.142DDD80@phekda.freeserve.co.uk> (message from Richard
Dawe on Sat, 27 Oct 2001 11:23:01 +0100)
Subject: Re: Some build fixes for the test suite
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1011021133036 DOT 22550C-100000 AT is> <3BDA8B05 DOT 142DDD80 AT phekda DOT freeserve DOT co DOT uk>
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

> Date: Sat, 27 Oct 2001 11:23:01 +0100
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> 
> Eli Zaretskii wrote:
> > 
> > On Sun, 21 Oct 2001, Richard Dawe wrote:
> [snip]
> > >       if (f->_cnt > last_count)
> > >       {
> > > !       printf("Count: %5d  Fill: %5d  Bufsiz: %5d  SoFar: %5d\n",
> > >              f->_cnt, f->_fillsize, f->_bufsiz, so_far);
> > >       }
> > >       last_count = f->_cnt;
> > > --- 12,18 ----
> > >     {
> > >       if (f->_cnt > last_count)
> > >       {
> > > !       printf("Count: %5d  Fill: %5ld  Bufsiz: %5ld  SoFar: %5d\n",
> > >              f->_cnt, f->_fillsize, f->_bufsiz, so_far);
> > 
> > If we are nitpicking, lets pick all the nits ;-)  Let's cast the size_t
> > members to long (actually, unsigned long sounds better).  That way, we
> > don't need to do anything if some day the size_t typedef changes.
> 
> But wouldn't you want the test to break, if size_t were changed?

I thought you were typecasting to avoid compiler warnings.  In that
case, my suggestion is better, since size_t is defined as unsigned
long in DJGPP.

If you want the test to break, your cast is also not perfect.

- Raw text -


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