1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix some harmless compiler warnings that were occurring with THREADSAFE=0.

FossilOrigin-Name: 9b191bb4c7c1e1b12b188c0b3eee1f8f587887c8
This commit is contained in:
drh
2011-06-24 11:29:51 +00:00
parent 15d31e1ee1
commit df3aa16e2b
5 changed files with 17 additions and 11 deletions

View File

@@ -427,7 +427,9 @@ static int osLocaltime(time_t *t, struct tm *pTm){
#if (!defined(HAVE_LOCALTIME_R) || !HAVE_LOCALTIME_R) \
&& (!defined(HAVE_LOCALTIME_S) || !HAVE_LOCALTIME_S)
struct tm *pX;
#if SQLITE_THREADSAFE>0
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
sqlite3_mutex_enter(mutex);
pX = localtime(t);
#ifndef SQLITE_OMIT_BUILTIN_TEST