From afe64ee0f796afb9296133cd0c7070109b0b8fd8 Mon Sep 17 00:00:00 2001 From: Bartlomiej Grzelewski Date: Thu, 24 Jul 2014 12:41:13 +0200 Subject: [PATCH] Remove compilation warrnings from sqlcipher. Change-Id: Ie9b9edcc4c113b228fcebc79a672109842aaaf73 --- src/manager/sqlcipher/sqlcipher.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/manager/sqlcipher/sqlcipher.c b/src/manager/sqlcipher/sqlcipher.c index 48a0673..a3a430e 100644 --- a/src/manager/sqlcipher/sqlcipher.c +++ b/src/manager/sqlcipher/sqlcipher.c @@ -12978,13 +12978,12 @@ SQLCIPHER_PRIVATE int sqlcipher3CodecAttach(sqlcipher3* db, int nDb, const void sqlcipher_activate(); if(nKey && zKey && pDb->pBt) { - int rc; Pager *pPager = pDb->pBt->pBt->pPager; sqlcipher3_file *fd = sqlcipher3Pager_get_fd(pPager); codec_ctx *ctx; /* point the internal codec argument against the contet to be prepared */ - rc = sqlcipher_codec_ctx_init(&ctx, pDb, pDb->pBt->pBt->pPager, fd, zKey, nKey); + sqlcipher_codec_ctx_init(&ctx, pDb, pDb->pBt->pBt->pPager, fd, zKey, nKey); sqlcipher3pager_sqlcipher3PagerSetCodec(sqlcipher3BtreePager(pDb->pBt), sqlcipher3Codec, NULL, sqlcipher3FreeCodecArg, (void *) ctx); @@ -13003,6 +13002,7 @@ SQLCIPHER_PRIVATE int sqlcipher3CodecAttach(sqlcipher3* db, int nDb, const void } SQLCIPHER_API void sqlcipher3_activate_see(const char* in) { + (void) in; /* do nothing, security enhancements are always active */ } @@ -13501,6 +13501,8 @@ int sqlcipher_codec_ctx_init(codec_ctx **iCtx, Db *pDb, Pager *pPager, sqlcipher *iCtx = sqlcipher_malloc(sizeof(codec_ctx)); ctx = *iCtx; + (void) pPager; + if(ctx == NULL) return SQLCIPHER_NOMEM; memset(ctx, 0, sizeof(codec_ctx)); /* initialize all pointers and values to 0 */ @@ -13834,7 +13836,9 @@ void sqlcipher_exportFunc(sqlcipher3_context *context, int argc, sqlcipher3_valu int rc = SQLCIPHER_OK; /* Return code from service routines */ char *zSql = NULL; /* SQL statements */ char *pzErrMsg = NULL; - + + (void) argc; + saved_flags = db->flags; saved_nChange = db->nChange; saved_nTotalChange = db->nTotalChange; -- 2.7.4