Mail Archives: djgpp-workers/2001/10/27/10:49:24
> 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 -