]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Rearrange a variable declaration in the proxy locking code to avoid a harmless
authordrh <drh@noemail.net>
Tue, 21 Dec 2010 00:16:40 +0000 (00:16 +0000)
committerdrh <drh@noemail.net>
Tue, 21 Dec 2010 00:16:40 +0000 (00:16 +0000)
compiler warning on recent MacOS versions.

FossilOrigin-Name: 39bbd35599e735b32f7ed18143073165b805dd98

manifest
manifest.uuid
src/os_unix.c

index 195351767b84cc0aa1c399d68765e241598f31c0..17705b4a17b70b2040c5136a1911dd9d1e0abc23 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,5 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-C Clarify\sthe\sdocumentation\sof\sthe\sSQLITE_STATUS_MALLOC_COUNT\sparameter\sto\nsqlite3_status().
-D 2010-12-20T17:00:28
+C Rearrange\sa\svariable\sdeclaration\sin\sthe\sproxy\slocking\scode\sto\savoid\sa\sharmless\ncompiler\swarning\son\srecent\sMacOS\sversions.
+D 2010-12-21T00:16:40
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 4547616ad2286053af6ccccefa242dc925e49bf0
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -163,7 +160,7 @@ F src/os.c 22ac61d06e72a0dac900400147333b07b13d8e1d
 F src/os.h 9dbed8c2b9c1f2f2ebabc09e49829d4777c26bf9
 F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f
 F src/os_os2.c 72d0b2e562952a2464308c4ce5f7913ac10bef3e
-F src/os_unix.c 0240c5b547b4cf585c8cac351a95c3e85ce00772
+F src/os_unix.c c43a55b46a6be81a4f29a52eb88245e5d7f342fa
 F src/os_win.c 2f90f7bdec714fad51cd31b4ecad3cc1b4bb5aad
 F src/pager.c c0aca5c733c15a16fe158c3215d857841a4e5381
 F src/pager.h 0ea59db2a33bc6c2c02cae34de33367e1effdf76
@@ -897,14 +894,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 74fff692345fed4b247e2b34c1e63b4d50cddfd4
-R 05696043bb691972743f116032eb7cc7
+P 3b41bcc3e36a9ef0146bc2f6ae86377bd1700afd
+R 1a70a1f19194c16e9b9725927017bb71
 U drh
-Z 0d94f4cb1ba5a4f17daf853cca6b2b1d
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
-
-iD8DBQFND4uvoxKgR168RlERAmboAJ9ECncAj8L2uNPORTjmNgH2KLgLGQCfTHpL
-w2fdORwbJsTAnpJEGct6W7Q=
-=6J0C
------END PGP SIGNATURE-----
+Z 9866ee9011213cea3ec50de8e4d375c6
index b5e82032acb53d21060475cd14344fb78c03b678..4ebd5e84babffae0fd5c4775c200645d02969843 100644 (file)
@@ -1 +1 @@
-3b41bcc3e36a9ef0146bc2f6ae86377bd1700afd
\ No newline at end of file
+39bbd35599e735b32f7ed18143073165b805dd98
\ No newline at end of file
index 72ac4c8048c1ec14c9f850df083f2ea3374a8ee0..ba699632d76c7932c4fc4be5a981f9523a67f121 100644 (file)
@@ -5403,18 +5403,19 @@ extern int gethostuuid(uuid_t id, const struct timespec *wait);
 ** bytes of writable memory.
 */
 static int proxyGetHostID(unsigned char *pHostID, int *pError){
-  struct timespec timeout = {1, 0}; /* 1 sec timeout */
-  
   assert(PROXY_HOSTIDLEN == sizeof(uuid_t));
   memset(pHostID, 0, PROXY_HOSTIDLEN);
 #if defined(__MAX_OS_X_VERSION_MIN_REQUIRED)\
                && __MAC_OS_X_VERSION_MIN_REQUIRED<1050
-  if( gethostuuid(pHostID, &timeout) ){
-    int err = errno;
-    if( pError ){
-      *pError = err;
+  {
+    static const struct timespec timeout = {1, 0}; /* 1 sec timeout */
+    if( gethostuuid(pHostID, &timeout) ){
+      int err = errno;
+      if( pError ){
+        *pError = err;
+      }
+      return SQLITE_IOERR;
     }
-    return SQLITE_IOERR;
   }
 #endif
 #ifdef SQLITE_TEST