Fix compiler warnings in the proxy locking code.
FossilOrigin-Name: 26c7689cfedf03e65bcd51df68d128101ed2c1ec
This commit is contained in:
parent
56c77ef853
commit
0ab216a6b4
22
manifest
22
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
|
||||
|
@ -1 +1 @@
|
||||
4f12e8ebdea0451cb32188a4bb812ca702c63275
|
||||
26c7689cfedf03e65bcd51df68d128101ed2c1ec
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user