Skip to content

Commit e74f0bf

Browse files
committed
chore: remove warnings
1 parent 7bb9476 commit e74f0bf

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/unit.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,9 +2459,9 @@ sqlite3 *do_create_database (void) {
24592459

24602460
void do_build_database_path (char buf[256], int i, time_t timestamp, int ntest) {
24612461
#ifdef __ANDROID__
2462-
sprintf(buf, "%s/cloudsync-test-%ld-%d-%d.sqlite", ".", timestamp, ntest, i);
2462+
snprintf(buf, 256, "%s/cloudsync-test-%ld-%d-%d.sqlite", ".", timestamp, ntest, i);
24632463
#else
2464-
sprintf(buf, "%s/cloudsync-test-%ld-%d-%d.sqlite", getenv("HOME"), timestamp, ntest, i);
2464+
snprintf(buf, 256, "%s/cloudsync-test-%ld-%d-%d.sqlite", getenv("HOME"), timestamp, ntest, i);
24652465
#endif
24662466
}
24672467

@@ -2958,8 +2958,7 @@ bool do_test_merge_check_db_version (int nclients, bool print_result, bool clean
29582958

29592959
if (print_result) {
29602960
printf("\n-> customers\n");
2961-
char *sql = "SELECT * FROM cloudsync_changes;";
2962-
do_query(db[1], sql, query_changes);
2961+
do_query(db[1], "SELECT * FROM cloudsync_changes;", query_changes);
29632962
}
29642963

29652964
result = true;
@@ -3064,8 +3063,7 @@ bool do_test_merge_check_db_version_2 (int nclients, bool print_result, bool cle
30643063

30653064
if (print_result) {
30663065
printf("\n-> customers\n");
3067-
char *sql = "SELECT * FROM cloudsync_changes();";
3068-
do_query(db[1], sql, query_changes);
3066+
do_query(db[1], "SELECT * FROM cloudsync_changes();", query_changes);
30693067
}
30703068

30713069
result = true;
@@ -4411,7 +4409,7 @@ bool do_test_merge_partial_failure (int nclients, bool print_result, bool cleanu
44114409
if (rc != SQLITE_OK) goto finalize;
44124410

44134411
// attempt merge - should handle any constraint violations gracefully
4414-
bool merge_result = do_merge(db, nclients, false);
4412+
do_merge(db, nclients, false);
44154413

44164414
// verify that databases are still in consistent state even if merge had issues
44174415
for (int i=0; i<nclients; ++i) {

0 commit comments

Comments
 (0)