Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2001 14:38:13 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        current@FreeBSD.org
Subject:   Patch to restore WARNS feature
Message-ID:  <200106121838.OAA91929@khavrinen.lcs.mit.edu>
In-Reply-To: <20010612155318.B79617@sunbay.com>
References:  <20010611212628.A37954@sunbay.com> <20010612155318.B79617@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 12 Jun 2001 15:53:18 +0300, Ruslan Ermilov <ru@FreeBSD.org> said:

> +	qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *),
> +	    (int (*) __P((const void *, const void *)))sp->fts_compar);

This is wrong.  The declaration of the comparison function should be
fixed, rather than papering over the mistake here.

(This is arguably a deficiency in the C standard.  qsort() should take
an additional state parameter for the comparison function, but
doesn't.)

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106121838.OAA91929>