]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix compilation issue with MSVC due to a misplaced variable declaration.
authormistachkin <mistachkin@noemail.net>
Mon, 27 Oct 2014 19:58:29 +0000 (19:58 +0000)
committermistachkin <mistachkin@noemail.net>
Mon, 27 Oct 2014 19:58:29 +0000 (19:58 +0000)
FossilOrigin-Name: 9588b345d09daaa49d24d7fb6cab732e64e5474e

manifest
manifest.uuid
src/random.c

index c24ca49842d9adcd4b493861f842a3d1ed88c032..4a6bd095ba97171aaea41e1d255c5935624e2faf 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\scompiler\swarning\sin\san\sassert\sstatement.
-D 2014-10-27T19:42:02.875
+C Fix\scompilation\sissue\swith\sMSVC\sdue\sto\sa\smisplaced\svariable\sdeclaration.
+D 2014-10-27T19:58:29.156
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -224,7 +224,7 @@ F src/pcache1.c e412cb585f777c840ddce0500eddc5c6043c2bb5
 F src/pragma.c 3f3e959390a10c0131676f0e307acce372777e0f
 F src/prepare.c b7b7bf020bd4c962f7c8aed5a3c542c7dfe9f9c7
 F src/printf.c c31012ac23e458081df4a32634b60424e0cdfaf3
-F src/random.c b8a058131851de1a37801b5587845ee73411c064
+F src/random.c f88232b90e308f58f1f8f10894d7a8a750d6f64d
 F src/resolve.c 4965007d6497b6a4d7a6d98751cc39712885f952
 F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e
 F src/select.c 428165951748151e87a15295b7357221433e311b
@@ -1207,7 +1207,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 9646a136e69cf2583965dfc9fac5f056af4cdb62
-R c8728e917d07299237654ca84312b584
+P d33a1ff3aad0bfabf70a98ac338a68f82074e4fe
+R ee98bc34f841b6720302924cb59e4bc2
 U mistachkin
-Z 269b8116d90b241ccd2319871bd381eb
+Z 8119f44960013a2ca52459062580ce07
index 3bcc889db6f6dae0213dc504b77177c1e00ca49d..f68a004aea4808868e62426f4b0a57efde1827f7 100644 (file)
@@ -1 +1 @@
-d33a1ff3aad0bfabf70a98ac338a68f82074e4fe
\ No newline at end of file
+9588b345d09daaa49d24d7fb6cab732e64e5474e
\ No newline at end of file
index c4241362de550fe94330d8d48a3ad7d229f970bd..bd109e71b31be4f983d90332be73627b42f9a408 100644 (file)
@@ -34,10 +34,6 @@ void sqlite3_randomness(int N, void *pBuf){
   unsigned char t;
   unsigned char *zBuf = pBuf;
 
-#ifndef SQLITE_OMIT_AUTOINIT
-  if( sqlite3_initialize() ) return;
-#endif
-
   /* The "wsdPrng" macro will resolve to the pseudo-random number generator
   ** state vector.  If writable static data is unsupported on the target,
   ** we have to locate the state vector at run-time.  In the more common
@@ -52,13 +48,23 @@ void sqlite3_randomness(int N, void *pBuf){
 #endif
 
 #if SQLITE_THREADSAFE
-  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG);
+  sqlite3_mutex *mutex;
+#endif
+
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize() ) return;
+#endif
+
+#if SQLITE_THREADSAFE
+  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG);
   sqlite3_mutex_enter(mutex);
 #endif
 
   if( N<=0 || pBuf==0 ){
     wsdPrng.isInit = 0;
+#if SQLITE_THREADSAFE
     sqlite3_mutex_leave(mutex);
+#endif
     return;
   }