couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject couch commit: updated refs/heads/master to 0430a7f
Date Thu, 01 Oct 2015 14:36:24 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master 2ea042294 -> 0430a7fb1


Fix "initialization from incompatible pointer type" warning for icu drv

It was caused by using ErlDrvSSizeT type instead of ErlDrvSizeT. It
was not an issue prior to R15 when ErlDrvSSizeT and ErlDrvSizeT where
basically int's.

Since we raised minimal Erlang release requirement up to R16B03-1,
there is no reason to maintain compatibility with pre-R15 for driver
so local COUCH_* types are replaced with ErlDrv* ones.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/0430a7fb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/0430a7fb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/0430a7fb

Branch: refs/heads/master
Commit: 0430a7fb18b45eb3144f9145e5e7531e59d83074
Parents: 2ea0422
Author: Alexander Shorin <kxepal@apache.org>
Authored: Thu Oct 1 17:12:01 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Thu Oct 1 17:34:30 2015 +0300

----------------------------------------------------------------------
 priv/icu_driver/couch_icu_driver.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/0430a7fb/priv/icu_driver/couch_icu_driver.c
----------------------------------------------------------------------
diff --git a/priv/icu_driver/couch_icu_driver.c b/priv/icu_driver/couch_icu_driver.c
index a59e8cb..4d9bb98 100644
--- a/priv/icu_driver/couch_icu_driver.c
+++ b/priv/icu_driver/couch_icu_driver.c
@@ -30,11 +30,6 @@ specific language governing permissions and limitations under the License.
 #include <string.h> /* for memcpy */
 #endif
 
-#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2
-typedef int COUCH_SSIZET;
-#else
-typedef ErlDrvSSizeT COUCH_SSIZET;
-#endif
 
 typedef struct {
     ErlDrvPort port;
@@ -85,9 +80,9 @@ static ErlDrvData couch_drv_start(ErlDrvPort port, char *buff)
     return (ErlDrvData)pData;
 }
 
-COUCH_SSIZET
+ErlDrvSSizeT
 return_control_result(void* pLocalResult, int localLen,
-            char **ppRetBuf, COUCH_SSIZET returnLen)
+            char **ppRetBuf, ErlDrvSizeT returnLen)
 {
     if (*ppRetBuf == NULL || localLen > returnLen) {
         *ppRetBuf = (char*)driver_alloc_binary(localLen);
@@ -99,10 +94,10 @@ return_control_result(void* pLocalResult, int localLen,
     return localLen;
 }
 
-static COUCH_SSIZET
+static ErlDrvSSizeT
 couch_drv_control(ErlDrvData drv_data, unsigned int command,
-        char *pBuf, COUCH_SSIZET bufLen,
-        char **rbuf, COUCH_SSIZET rlen)
+        char *pBuf, ErlDrvSizeT bufLen,
+        char **rbuf, ErlDrvSizeT rlen)
 {
 
     couch_drv_data* pData = (couch_drv_data*)drv_data;


Mime
View raw message