rem: qsort(files, nfiles, sizeof(File *), CmpFile);
add: qsort(files, (size_t)nfiles, sizeof(File *), CmpFile);
context: Ns_PurgeFiles(char *file, int max){    char *slash, *tail;    DIR *dp;    struct dirent *ent;    File **files;    int tlen, i, nfiles, status;    Ns_DString dir, list;        status = NS_ERROR;    Ns_DStringInit(&dir);    Ns_DStringInit(&list);        /*     * Determine the directory component.      */    Ns_NormalizePath(&dir, file);    slash = strrchr (dir.string, '/');    if (slash == NULL || slash[1] == '\0') {	Ns_Log (Error, "rollfile: failed to purge files: invalid path '%s'",		file);    	goto err;    }    *slash = '\0';    tail = slash + 1;    tlen = strlen(tail);        dp = opendir(dir.string);    if (dp == NULL) {    	Ns_Log(Error, "rollfile: failed to purge files:opendir(%s) failed: '%s'",	       dir.string, strerror(errno));	goto err;    }    while ((ent = ns_readdir(dp)) != NULL) {	if (strncmp(tail, ent->d_name, tlen) != 0) {	    continue;	}    	if (!AppendFile(&list, dir.string, ent->d_name)) {	    closedir(dp);	    goto err;	}    }    closedir(dp);    nfiles = list.length / sizeof(File *);    if (nfiles >= max) {	files = (File **) list.string;	qsort(files, nfiles, sizeof(File *), CmpFile);	for (i = max; i < nfiles; ++i) {	    if (Unlink(files[i]->name) != 0) {	    	goto err;	    }	}    }    status = NS_OK;err:    nfiles = list.length / sizeof(File *);    if (nfiles > 0) {	files = (File **) list.string;	for (i = 0; i < nfiles; ++i) {    	    ns_free(files[i]);	}    }    Ns_DStringFree(&list);    Ns_DStringFree(&dir);    return status;}