From owner-freebsd-current Tue Jun 12 11:38:17 2001 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id B626A37B409; Tue, 12 Jun 2001 11:38:14 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id OAA91929; Tue, 12 Jun 2001 14:38:13 -0400 (EDT) (envelope-from wollman) Date: Tue, 12 Jun 2001 14:38:13 -0400 (EDT) From: Garrett Wollman Message-Id: <200106121838.OAA91929@khavrinen.lcs.mit.edu> To: Ruslan Ermilov Cc: current@FreeBSD.org Subject: Patch to restore WARNS feature In-Reply-To: <20010612155318.B79617@sunbay.com> References: <20010611212628.A37954@sunbay.com> <20010612155318.B79617@sunbay.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: 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