delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/09/23/15:58:00

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: qsort warning
Date: Thu, 19 Sep 2002 06:13:09 -0500
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <Pine.LNX.4.02.10209190604150.5107-100000@myp60.mysystem.org>
X-Sender: steve AT myp60 DOT mysystem DOT org
MIME-Version: 1.0
X-Complaints-To: abuse AT supernews DOT com
Lines: 31
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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)
{
   int k1, k2;

   k1 = *(int *)kptr1, k2 = *(int *)kptr2;

   if( allfiles[k1].FFBLK.ff_fsize < allfiles[k2].FFBLK.ff_fsize )
      return 1;
   if( allfiles[k1].FFBLK.ff_fsize > allfiles[k2].FFBLK.ff_fsize )
      return -1;
   return 0;
}


--


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019