X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: qsort warning Date: 19 Sep 2002 11:59:57 GMT Organization: Aachen University of Technology (RWTH) Lines: 18 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1032436797 26161 137.226.32.75 (19 Sep 2002 11:59:57 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 19 Sep 2002 11:59:57 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com shmartonak AT ticnet DOT com wrote: > Can someone tell me what the following warning means? > teepdir.c:284: warning: passing arg 4 of `qsort' from incompatible pointer > type > int qsizesort( void *kptr1, void *kptr2) ^^^^^^^^^^^^^^^^^^^^^^^^^ Both arguments of a qsort comparison functions must be "const void *". The missing "const" is what makes the function pointer incompatible, and thus generates the warning. Re-check the documentation or your ANSI C textbook. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.