From: <zu...@us...> - 2015-03-16 14:06:12
|
Revision: 5151 http://sourceforge.net/p/fuse-emulator/code/5151 Author: zubzero Date: 2015-03-16 14:06:04 +0000 (Mon, 16 Mar 2015) Log Message: ----------- Define ZLIB_CONST when including <zlib.h> and remove unnecessary cast Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/zlib.c trunk/libspectrum/zxs.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-03-16 13:35:58 UTC (rev 5150) +++ trunk/libspectrum/hacking/ChangeLog 2015-03-16 14:06:04 UTC (rev 5151) @@ -994,3 +994,5 @@ --with-fake-glib) (Stuart). 20150315 make-perl.c: add LIBSPECTRUM_HAS_GLIB_REPLACEMENT macro (Stuart). 20150316 configure.ac: always use -Wwrite-strings when using GCC (Stuart). +20150316 zlib.c,zxs.c: define ZLIB_CONST when including <zlib.h> and remove cast + used as workaround for discarding of const (Stuart). Modified: trunk/libspectrum/zlib.c =================================================================== --- trunk/libspectrum/zlib.c 2015-03-16 13:35:58 UTC (rev 5150) +++ trunk/libspectrum/zlib.c 2015-03-16 14:06:04 UTC (rev 5151) @@ -38,6 +38,7 @@ #include <unistd.h> #endif /* #ifdef HAVE_UNISTD_H */ +#define ZLIB_CONST #include <zlib.h> #include "internals.h" @@ -86,8 +87,7 @@ /* Use default memory management */ stream.zalloc = Z_NULL; stream.zfree = Z_NULL; stream.opaque = Z_NULL; - /* Cast needed to avoid warning about losing const */ - stream.next_in = (libspectrum_byte*)gzptr; stream.avail_in = gzlength; + stream.next_in = gzptr; stream.avail_in = gzlength; if( gzip_hack ) { Modified: trunk/libspectrum/zxs.c =================================================================== --- trunk/libspectrum/zxs.c 2015-03-16 13:35:58 UTC (rev 5150) +++ trunk/libspectrum/zxs.c 2015-03-16 14:06:04 UTC (rev 5151) @@ -28,6 +28,7 @@ #include <string.h> #ifdef HAVE_ZLIB_H +#define ZLIB_CONST #include <zlib.h> #endif /* #ifdef HAVE_ZLIB_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |