]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix compiler warnings in the proxy locking code.
authordrh <drh@noemail.net>
Fri, 2 Jul 2010 17:10:40 +0000 (17:10 +0000)
committerdrh <drh@noemail.net>
Fri, 2 Jul 2010 17:10:40 +0000 (17:10 +0000)
FossilOrigin-Name: 26c7689cfedf03e65bcd51df68d128101ed2c1ec

manifest
manifest.uuid
src/os_unix.c

index 19369bd767ba1b5324ffce32c8ab2c9f0fce0292..df5de6f21a075ece743d52b5647d846c79dafab5 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,5 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-C Remove\sa\scouple\sof\sC++\sstyle\scomments\sfrom\spager.c.
-D 2010-07-02T17:07:43
+C Fix\scompiler\swarnings\sin\sthe\sproxy\slocking\scode.
+D 2010-07-02T17:10:40
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -157,7 +154,7 @@ F src/os.c 1b3a1edf20587639d9d88bfebe018f7a6e7ba0ec
 F src/os.h d7775504a51e6e0d40315aa427b3e229ff9ff9ca
 F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f
 F src/os_os2.c 665876d5eec7585226b0a1cf5e18098de2b2da19
-F src/os_unix.c ec7c7f7ca224ce2ff58736eebf804b48a75f9946
+F src/os_unix.c d7910391a4c9fa6898f7c9abbbb821d5d7edb78f
 F src/os_win.c e82ed9e1c1d5df0ece234fd3157c32d66bb2c83c
 F src/pager.c b75a7fa96ecc8bef91bb014499f77a8f5f705252
 F src/pager.h 879fdde5a102d2f21a3135d6f647530b21c2796c
@@ -833,14 +830,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 708338773919fa024abbba55180654beb60e6d84
-R 56b3a4a9fa36e818b989f40fbaef7f09
+P 4f12e8ebdea0451cb32188a4bb812ca702c63275
+R dd50a62a23a351f895fe97e6e7ee7360
 U drh
-Z e208ba6e4f72fc440284751a55d7e826
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
-
-iD8DBQFMLhzioxKgR168RlERAgGjAJ0eil1y00l5a9iOlov7m/HUfTDa3QCfUzwU
-xLndwI7gtcx7LCR8W0pzDEs=
-=UYB8
------END PGP SIGNATURE-----
+Z ce4932a249c59f257fa082491231c511
index 278f0dd450214080f96e7f3855f37ddcbee41a7c..6d3dde8cc1f5f62dba5ef55e0733113b758be8be 100644 (file)
@@ -1 +1 @@
-4f12e8ebdea0451cb32188a4bb812ca702c63275
\ No newline at end of file
+26c7689cfedf03e65bcd51df68d128101ed2c1ec
\ No newline at end of file
index 06712668b6e7745a330d6822679071ce3d1218f2..a41b579838d7dd115407a784fe76d3a0c1c6b95e 100644 (file)
@@ -5067,7 +5067,7 @@ static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){
   
   /* transform the db path to a unique cache name */
   dbLen = (int)strlen(dbPath);
-  for( i=0; i<dbLen && (i+len+7)<maxLen; i++){
+  for( i=0; i<dbLen && (i+len+7)<(int)maxLen; i++){
     char c = dbPath[i];
     lPath[i+len] = (c=='/')?'_':c;
   }
@@ -5208,6 +5208,9 @@ int sqlite3_hostid_num = 0;
 
 #define PROXY_HOSTIDLEN    16  /* conch file host id length */
 
+/* Not always defined in the headers as it ought to be */
+extern int gethostuuid(uuid_t id, const struct timespec *wait);
+
 /* get the host ID via gethostuuid(), pHostID must point to PROXY_HOSTIDLEN 
 ** bytes of writable memory.
 */
@@ -5257,6 +5260,7 @@ static int proxyBreakConchLock(unixFile *pFile, uuid_t myHostID){
   char errmsg[64] = "";
   int fd = -1;
   int rc = -1;
+  UNUSED_PARAMETER(myHostID);
 
   /* create a new path by replace the trailing '-conch' with '-break' */
   pathLen = strlcpy(tPath, cPath, MAXPATHLEN);
@@ -5277,7 +5281,7 @@ static int proxyBreakConchLock(unixFile *pFile, uuid_t myHostID){
     sprintf(errmsg, "create failed (%d)", errno);
     goto end_breaklock;
   }
-  if( pwrite(fd, buf, readLen, 0) != readLen ){
+  if( pwrite(fd, buf, readLen, 0) != (ssize_t)readLen ){
     sprintf(errmsg, "write failed (%d)", errno);
     goto end_breaklock;
   }