summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2007-07-20 01:28:50 +0000
committerkientzle <kientzle@FreeBSD.org>2007-07-20 01:28:50 +0000
commit87f8733d7051bed5b7408b3389e6cca4b14caca9 (patch)
treeac9e98990a9e0c0193bc177f5041173ea144f17e /lib
parent779bdfcafb4611a8af0ccdce8070988b08850d5f (diff)
downloadFreeBSD-src-87f8733d7051bed5b7408b3389e6cca4b14caca9.zip
FreeBSD-src-87f8733d7051bed5b7408b3389e6cca4b14caca9.tar.gz
Fix a strict aliasing warning from GCC 4.1.
Thanks to: Joerg Sonnenberger Approved by: re (hrs) MFC after: 3 days
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive_read_support_compression_program.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read_support_compression_program.c b/lib/libarchive/archive_read_support_compression_program.c
index d406797..dfea568 100644
--- a/lib/libarchive/archive_read_support_compression_program.c
+++ b/lib/libarchive/archive_read_support_compression_program.c
@@ -113,6 +113,7 @@ child_read(struct archive_read *a, char *buf, size_t buf_len)
{
struct archive_decompress_program *state = a->decompressor->data;
ssize_t ret, requested;
+ const void *child_buf;
if (state->child_stdout == -1)
return (-1);
@@ -138,8 +139,10 @@ restart_read:
return (-1);
if (state->child_in_buf_avail == 0) {
+ child_buf = state->child_in_buf;
ret = (a->client_reader)(&a->archive,
- a->client_data, (const void **)&state->child_in_buf);
+ a->client_data,&child_buf);
+ state->child_in_buf = (const char *)child_buf;
if (ret < 0) {
close(state->child_stdin);
OpenPOWER on IntegriCloud