Skip to content

Commit 3edfb4f

Browse files
Adjustments due to warnings after switching NDK to r15c from r11c
1 parent fa8158d commit 3edfb4f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

android-database-sqlcipher/src/main/cpp/net_sqlcipher_CursorWindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ namespace sqlcipher {
283283
int64_t value;
284284
if (window->getLong(row, column, &value)) {
285285
char buf[32];
286-
snprintf(buf, sizeof(buf), "%lld", value);
286+
snprintf(buf, sizeof(buf), "%"PRId64"", value);
287287
return env->NewStringUTF((const char*)buf);
288288
}
289289
return NULL;
@@ -294,8 +294,8 @@ namespace sqlcipher {
294294
snprintf(buf, sizeof(buf), "%g", value);
295295
return env->NewStringUTF(buf);
296296
}
297-
return NULL;
298297
}
298+
return NULL;
299299
}
300300

301301
/**
@@ -359,7 +359,7 @@ namespace sqlcipher {
359359
if (window->getLong(row, column, &value)) {
360360
int len;
361361
char buf[32];
362-
len = snprintf(buf, sizeof(buf), "%lld", value);
362+
len = snprintf(buf, sizeof(buf), "%"PRId64"", value);
363363
jint bufferLength = env->GetArrayLength(buffer);
364364
if(len > bufferLength || dst == NULL){
365365
jstring content = env->NewStringUTF(buf);

android-database-sqlcipher/src/main/cpp/net_sqlcipher_database_SQLiteCompiledSql.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include <sqlite3.h>
2626
#include <stdio.h>
27+
#include <stdlib.h>
2728
#include <string.h>
2829
#include <unistd.h>
2930
#include "log.h"

android-database-sqlcipher/src/main/cpp/net_sqlcipher_database_SQLiteDatabase.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <sqlite3.h>
2222
#include <ctype.h>
2323
#include <stdio.h>
24+
#include <stdlib.h>
2425
#include <string.h>
2526
#include <sys/types.h>
2627
#include <sys/ioctl.h>

0 commit comments

Comments
 (0)