[Zlib-devel] [PATCH] Usage of const/z_const, with and without ZLIB_CONST
Daniel Richard G.
oss at teragram.com
Mon Jun 4 16:49:46 EDT 2012
This patch, against git master, attempts to sort out usage of const/z_const
in the library. When compiling with GCC's -Wcast-qual, it reduces the number
of "cast discards '__attribute__((const))' qualifier from pointer target
type" warnings to the minimum, in both the ZLIB_CONST #define'd and
#undef'ed cases.
There are a handful of places in which casting to non-const is unavoidable,
at least without refactoring, but the patch picks off all the low-hanging
fruit. Questions and comments welcome.
--Daniel
--
Daniel Richard G. || danielg at teragram.com || Software Developer
Teragram Linguistic Technologies (a division of SAS)
http://www.teragram.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zlib-const.patch.txt
Type: application/octet-stream
Size: 11822 bytes
Desc: not available
URL: <http://madler.net/pipermail/zlib-devel_madler.net/attachments/20120604/11fed119/attachment.obj>
More information about the Zlib-devel
mailing list