Mail Archives: djgpp-workers/2001/10/27/06:24:45
Hello.
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? Otherwise
you could hide the fact that the test needed some work, to cope with the
size_t change.
> > *** tests/libc/ansi/time/strftime.c 1997/11/02 15:23:56 1.1
> > --- tests/libc/ansi/time/strftime.c 2001/10/14 21:01:37
> > *************** compare (const char *fmt, const struct t
> > *** 28,33 ****
> > --- 28,35 ----
> > int
> > main (void)
> > {
> > + #undef TZ
> > + char TZ[] = "TZ=GMT0";
>
> I don't understand the reason for this one. Can you explain?
>
This is from tests/libc/ansi/dos/io/putpath.c:
> > ! putenv(strdup("DJDIR=c:/djgpp2"));
> > ! putenv(strdup("HOME=c:\\home"));
>
> Yuck! Is this because of the "const char *" vs "char *" nuisance? If
> so, won't simple cast or `unconst' do?
You get a warning if you just do a cast, because some qualifiers are
discarded (const, I guess). I've updated the tests to use unconst instead
of strdup now. I'll check the unconst fixes in.
Thanks for looking at the patch. Bye, Rich =]
--
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/
- Raw text -