g10: Fix iobuf API of filter function for alignment.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 26 Jan 2016 06:38:27 +0000 (15:38 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 26 Jan 2016 06:38:27 +0000 (15:38 +0900)
commitaa4a3aa3e7a0c7dc231b90b2958184c7138ccc93
treeabeaee7ef1f185d65bbcb1cf513f80d9878914d0
parenta38dffde7b19bd4881afcd87c23aac2daa5bd52a
g10: Fix iobuf API of filter function for alignment.

* include/iobuf.h (struct iobuf_struct): Remove DESC.
* util/iobuf.c (iobuf_desc): New.
(print_chain, iobuf_close, iobuf_open, iobuf_fdopen, iobuf_sockopen)
(iobuf_create, iobuf_append, iobuf_openrw, iobuf_ioctl)
(iobuf_push_filter2, pop_filter, underflow): Use iobuf_desc.
(file_filter, sock_filter, block_filter): Fill the description.
* g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c,
g10/encode.c, g10/encr-data.c, g10/mdfilter.c, g10/pipemode.c,
g10/progress.c, g10/textfilter.c: Likewise.

--

Newer GCC warns against possible alignment difference of pointers.
This change can silence those warnings.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(backported from 2.1 commit 3f52c7da3940ec06572270d511000dc7fe9c27d2)
12 files changed:
g10/armor.c
g10/cipher.c
g10/compress-bz2.c
g10/compress.c
g10/encode.c
g10/encr-data.c
g10/mdfilter.c
g10/pipemode.c
g10/progress.c
g10/textfilter.c
include/iobuf.h
util/iobuf.c