correct warnings for UAP builds
This commit is contained in:
parent
537dcf75e5
commit
9249f54531
|
@ -336,7 +336,7 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
|
|||
if( sqlite3StrICmp(zLeft,"cipher_hmac_algorithm")==0 ){
|
||||
if(ctx) {
|
||||
if(zRight) {
|
||||
int rc = SQLITE_ERROR;
|
||||
rc = SQLITE_ERROR;
|
||||
if(sqlite3StrICmp(zRight, SQLCIPHER_HMAC_SHA1_LABEL) == 0) {
|
||||
rc = sqlcipher_codec_ctx_set_hmac_algorithm(ctx, SQLCIPHER_HMAC_SHA1);
|
||||
} else if(sqlite3StrICmp(zRight, SQLCIPHER_HMAC_SHA256_LABEL) == 0) {
|
||||
|
@ -361,7 +361,7 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
|
|||
}else
|
||||
if( sqlite3StrICmp(zLeft,"cipher_default_hmac_algorithm")==0 ){
|
||||
if(zRight) {
|
||||
int rc = SQLITE_ERROR;
|
||||
rc = SQLITE_ERROR;
|
||||
if(sqlite3StrICmp(zRight, SQLCIPHER_HMAC_SHA1_LABEL) == 0) {
|
||||
rc = sqlcipher_set_default_hmac_algorithm(SQLCIPHER_HMAC_SHA1);
|
||||
} else if(sqlite3StrICmp(zRight, SQLCIPHER_HMAC_SHA256_LABEL) == 0) {
|
||||
|
@ -384,7 +384,7 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
|
|||
if( sqlite3StrICmp(zLeft,"cipher_kdf_algorithm")==0 ){
|
||||
if(ctx) {
|
||||
if(zRight) {
|
||||
int rc = SQLITE_ERROR;
|
||||
rc = SQLITE_ERROR;
|
||||
if(sqlite3StrICmp(zRight, SQLCIPHER_PBKDF2_HMAC_SHA1_LABEL) == 0) {
|
||||
rc = sqlcipher_codec_ctx_set_kdf_algorithm(ctx, SQLCIPHER_PBKDF2_HMAC_SHA1);
|
||||
} else if(sqlite3StrICmp(zRight, SQLCIPHER_PBKDF2_HMAC_SHA256_LABEL) == 0) {
|
||||
|
@ -407,7 +407,7 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
|
|||
}else
|
||||
if( sqlite3StrICmp(zLeft,"cipher_default_kdf_algorithm")==0 ){
|
||||
if(zRight) {
|
||||
int rc = SQLITE_ERROR;
|
||||
rc = SQLITE_ERROR;
|
||||
if(sqlite3StrICmp(zRight, SQLCIPHER_PBKDF2_HMAC_SHA1_LABEL) == 0) {
|
||||
rc = sqlcipher_set_default_kdf_algorithm(SQLCIPHER_PBKDF2_HMAC_SHA1);
|
||||
} else if(sqlite3StrICmp(zRight, SQLCIPHER_PBKDF2_HMAC_SHA256_LABEL) == 0) {
|
||||
|
|
|
@ -301,8 +301,8 @@ int sqlcipher_memcmp(const void *v0, const void *v1, int len) {
|
|||
|
||||
void sqlcipher_mlock(void *ptr, int sz) {
|
||||
#ifndef OMIT_MEMLOCK
|
||||
int rc;
|
||||
#if defined(__unix__) || defined(__APPLE__)
|
||||
int rc;
|
||||
unsigned long pagesize = sysconf(_SC_PAGESIZE);
|
||||
unsigned long offset = (unsigned long) ptr % pagesize;
|
||||
|
||||
|
@ -315,6 +315,7 @@ void sqlcipher_mlock(void *ptr, int sz) {
|
|||
}
|
||||
#elif defined(_WIN32)
|
||||
#if !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP))
|
||||
int rc;
|
||||
CODEC_TRACE("sqlcipher_mem_lock: calling VirtualLock(%p,%d)\n", ptr, sz);
|
||||
rc = VirtualLock(ptr, sz);
|
||||
if(rc==0) {
|
||||
|
@ -327,8 +328,8 @@ void sqlcipher_mlock(void *ptr, int sz) {
|
|||
|
||||
void sqlcipher_munlock(void *ptr, int sz) {
|
||||
#ifndef OMIT_MEMLOCK
|
||||
int rc;
|
||||
#if defined(__unix__) || defined(__APPLE__)
|
||||
int rc;
|
||||
unsigned long pagesize = sysconf(_SC_PAGESIZE);
|
||||
unsigned long offset = (unsigned long) ptr % pagesize;
|
||||
|
||||
|
@ -341,6 +342,7 @@ void sqlcipher_munlock(void *ptr, int sz) {
|
|||
}
|
||||
#elif defined(_WIN32)
|
||||
#if !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP))
|
||||
int rc;
|
||||
CODEC_TRACE("sqlcipher_mem_lock: calling VirtualUnlock(%p,%d)\n", ptr, sz);
|
||||
rc = VirtualUnlock(ptr, sz);
|
||||
if(!rc) {
|
||||
|
|
Loading…
Reference in New Issue