mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
Fix a type-aliasing problem in the libarchive test suite,
restore WARNS=6.
This commit is contained in:
parent
7217c39672
commit
a2a72fd640
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182860
|
@ -89,7 +89,7 @@ CFLAGS+= -I${LA_SRCDIR} -I.
|
|||
# Uncomment to link against dmalloc
|
||||
#LDADD+= -L/usr/local/lib -ldmalloc
|
||||
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
|
||||
#WARNS=6
|
||||
WARNS=6
|
||||
|
||||
# Build libarchive_test and run it.
|
||||
check test: libarchive_test
|
||||
|
|
|
@ -187,6 +187,7 @@ verify_archive_file(const char *name, struct archive_contents *ac)
|
|||
struct contents expect;
|
||||
/* data, size, offset of block read from archive. */
|
||||
struct contents actual;
|
||||
const void *p;
|
||||
struct archive *a;
|
||||
|
||||
extract_reference_file(name);
|
||||
|
@ -206,10 +207,10 @@ verify_archive_file(const char *name, struct archive_contents *ac)
|
|||
|
||||
expect = *cts++;
|
||||
while (0 == (err = archive_read_data_block(a,
|
||||
(const void **)&actual.d,
|
||||
&actual.s, &actual.o))) {
|
||||
&p, &actual.s, &actual.o))) {
|
||||
actual.d = p;
|
||||
while (actual.s > 0) {
|
||||
char c = *(const char *)actual.d;
|
||||
char c = *actual.d;
|
||||
if(actual.o < expect.o) {
|
||||
/*
|
||||
* Any byte before the expected
|
||||
|
|
Loading…
Reference in a new issue