[test-suite] r178660 - Removing sources of uncertainty from ClamAV
Ulrich Weigand
Ulrich.Weigand at de.ibm.com
Fri Apr 5 09:33:54 PDT 2013
Renato Golin wrote:
>+ qsort(dents, ndents, sizeof(struct dirent), dirent_compare);
>+
>+ for (unsigned i=0; i<ndents; i++) {
>+ dent = &dents[i];
This breaks the test when building with a C89 compiler (e.g. GCC
in default mode). Also, the qsort call gets a warning due to
dirent_compare having not quite the correct type:
/home7/uweigand/llvm/llvm-head/projects/test-suite/MultiSource/Applications/ClamAV/libclamav_readdb.c:
In function 'cli_loaddbdir_l':
/home7/uweigand/llvm/llvm-head/projects/test-suite/MultiSource/Applications/ClamAV/libclamav_readdb.c:1135:40:
warning: passing argument 4 of 'qsort' from incompatible pointer type
[enabled by default]
In file included
from /home7/uweigand/llvm/llvm-head/projects/test-suite/MultiSource/Applications/ClamAV/libclamav_readdb.c:28:0:
/usr/include/stdlib.h:756:13: note: expected '__compar_fn_t' but argument
is of type 'int (*)(const struct dirent *, const struct dirent *)'
/home7/uweigand/llvm/llvm-head/projects/test-suite/MultiSource/Applications/ClamAV/libclamav_readdb.c:1137:5:
error: 'for' loop initial declarations are only allowed in C99 mode
Bye,
Ulrich
More information about the llvm-commits
mailing list