aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-07-02 17:10:40 +0000
committerdrh <drh@noemail.net>2010-07-02 17:10:40 +0000
commit0ab216a6b4bd4b6f542584f332567183f07cd93b (patch)
tree5a57ef93bb16c85fe2bc0d36781e22e283591dc2 /src/os_unix.c
parent56c77ef8536e264546ef7405e4f31c339e8db6f7 (diff)
downloadsqlite-0ab216a6b4bd4b6f542584f332567183f07cd93b.tar.gz
sqlite-0ab216a6b4bd4b6f542584f332567183f07cd93b.zip
Fix compiler warnings in the proxy locking code.
FossilOrigin-Name: 26c7689cfedf03e65bcd51df68d128101ed2c1ec
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 06712668b..a41b57983 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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;
}