[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kioslave/http
From:       Adriaan de Groot <groot () kde ! org>
Date:       2007-09-15 22:41:21
Message-ID: 1189896081.009118.18018.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 712988 by adridg:

Handle older zlib with a strict compiler, too

 M  +4 -1      http.cpp  


--- trunk/KDE/kdelibs/kioslave/http/http.cpp #712987:712988
@@ -4797,7 +4797,10 @@
 
 void HTTPProtocol::writeCacheEntry( const char *buffer, int nbytes)
 {
-   if (gzwrite(m_request.fcache, buffer, nbytes) == 0)
+   // gzwrite's second argument has type void *const in 1.1.4 and
+   // const void * in 1.2.3, so we futz buffer to a plain void * and
+   // let the compiler figure it out from there.
+   if (gzwrite(m_request.fcache, const_cast<void *>(static_cast<const void *>(buffer)), nbytes) == 0)
    {
       kWarning(7113) << "writeCacheEntry: writing " << nbytes << " bytes failed.";
       gzclose(m_request.fcache);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic