diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-09-08 00:58:12 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-09-08 00:58:12 +0000 |
commit | 97fcc0ce31300825e8d5cf214d8302ffa2f891e9 (patch) | |
tree | 0349d827adec97a6ce83103af8717f8c5d12e9e7 /lib/libarchive/test/test_read_format_gtar_sparse.c | |
parent | ec02d7a2e06a8a5358377f65c173689a5300bfe7 (diff) | |
download | FreeBSD-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/libarchive/test/test_read_format_gtar_sparse.c')
-rw-r--r-- | lib/libarchive/test/test_read_format_gtar_sparse.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 |