X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: shmartonak AT ticnet DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: qsort warning Date: Thu, 19 Sep 2002 07:38:58 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: X-Sender: steve AT myp60 DOT mysystem DOT org In-Reply-To: <010201c25fd7$d4d03f20$ee148589@bgo.nera.no> References: <010201c25fd7$d4d03f20$ee148589 AT bgo DOT nera DOT no> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: abuse AT supernews DOT com Lines: 30 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 19 Sep 2002, Gisle Vanem wrote: > said: > > > > Can someone tell me what the following warning means? > > > > teepdir.c:284: warning: passing arg 4 of `qsort' from incompatible pointer > > type > > > > My invocation of 'qsort' is > > > > if( zflag) > > qsort( (void *)key, filecount, sizeof(int), qsizesort); > > > > and my comparison function is > > > > > > int qsizesort( void *kptr1, void *kptr2) > > You should define that as "int qsizesort( const void *kptr1, const void *kptr2)". > > Gisle V. Thanks! --