Message-ID: <010201c25fd7$d4d03f20$ee148589@bgo.nera.no> From: "Gisle Vanem" To: References: Subject: Re: qsort warning Date: Thu, 19 Sep 2002 14:26:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Reply-To: djgpp AT delorie DOT com 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.