Skip to content

Commit

Permalink
omit unused profiling function under certain defines
Browse files Browse the repository at this point in the history
  • Loading branch information
sjlombardo committed Feb 10, 2021
1 parent d7f468c commit 34e7f1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/crypto_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,11 +1535,13 @@ int sqlcipher_codec_add_random(codec_ctx *ctx, const char *zRight, int random_sz
return SQLITE_ERROR;
}

#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_DEPRECATED)
static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){
FILE *f = (FILE*)file;
double elapsed = run_time/1000000.0;
if(f) fprintf(f, "Elapsed time:%.3f ms - %s\n", elapsed, sql);
}
#endif

int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)
Expand Down

0 comments on commit 34e7f1b

Please sign in to comment.