summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-09-08 00:58:12 +0000
committerkientzle <kientzle@FreeBSD.org>2008-09-08 00:58:12 +0000
commit97fcc0ce31300825e8d5cf214d8302ffa2f891e9 (patch)
tree0349d827adec97a6ce83103af8717f8c5d12e9e7 /lib
parentec02d7a2e06a8a5358377f65c173689a5300bfe7 (diff)
downloadFreeBSD-src-97fcc0ce31300825e8d5cf214d8302ffa2f891e9.zip
FreeBSD-src-97fcc0ce31300825e8d5cf214d8302ffa2f891e9.tar.gz
Fix a type-aliasing problem in the libarchive test suite,
restore WARNS=6.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/test/Makefile2
-rw-r--r--lib/libarchive/test/test_read_format_gtar_sparse.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/libarchive/test/Makefile b/lib/libarchive/test/Makefile
index cbfb6dd..42869e8 100644
--- a/lib/libarchive/test/Makefile
+++ b/lib/libarchive/test/Makefile
@@ -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
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse.c b/lib/libarchive/test/test_read_format_gtar_sparse.c
index 4506a3a..2c4a7e3 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse.c
+++ b/lib/libarchive/test/test_read_format_gtar_sparse.c
@@ -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
OpenPOWER on IntegriCloud