Mail Archives: djgpp/2002/09/19/07:30:03
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 -