Fix several harmless compiler warnings and a documentation bug.
FossilOrigin-Name: 5454d0fe227b7c1f0e7715b6c08f97019628fc4c
This commit is contained in:
parent
25d054fabd
commit
3d4435b234
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Update\scompiler\serror\smessage\sregarding\sthe\schoice\sof\smemory\sallocator\sdefines.
|
||||
D 2011-08-26T11:25:02.455
|
||||
C Fix\sseveral\sharmless\scompiler\swarnings\sand\sa\sdocumentation\sbug.
|
||||
D 2011-08-26T20:55:50.529
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 8c930e7b493d59099ea1304bd0f2aed152eb3315
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -165,7 +165,7 @@ F src/os.c fcc717427a80b2ed225373f07b642dc1aad7490b
|
||||
F src/os.h 9dbed8c2b9c1f2f2ebabc09e49829d4777c26bf9
|
||||
F src/os_common.h 65a897143b64667d23ed329a7984b9b405accb58
|
||||
F src/os_os2.c 4a75888ba3dfc820ad5e8177025972d74d7f2440
|
||||
F src/os_unix.c 1a34ca3794ced80e4a4ebcc3ba1f4c516762e534
|
||||
F src/os_unix.c 3792524439a13af0464ba65baf4d647dad063604
|
||||
F src/os_win.c 86bcb5bd0386c761c764c3383879469346da3a14
|
||||
F src/pager.c 817f7f7140c9fa2641f28e6330e924708ddd870d
|
||||
F src/pager.h 2bab1b2ea4eac58663b5833e3522e36b5ff63447
|
||||
@ -961,7 +961,7 @@ F tool/symbols.sh caaf6ccc7300fd43353318b44524853e222557d5
|
||||
F tool/tostr.awk 11760e1b94a5d3dcd42378f3cc18544c06cfa576
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings.sh b7fdb2cc525f5ef4fa43c80e771636dd3690f9d2
|
||||
P 5238a74987507f27af4080e2842f53e049b5b111
|
||||
R 68d004e4a18ddd9b15416c3d56993539
|
||||
U mistachkin
|
||||
Z cf5bdd8db49b4512fd908f85b844bfec
|
||||
P 1dada5158215d1816edb69ff2610f9d2259ce19d
|
||||
R 16e082a02686bfb3de55c1b850240992
|
||||
U drh
|
||||
Z 9f47e5dd82da8bb114d554ebcb62232c
|
||||
|
@ -1 +1 @@
|
||||
1dada5158215d1816edb69ff2610f9d2259ce19d
|
||||
5454d0fe227b7c1f0e7715b6c08f97019628fc4c
|
@ -2525,11 +2525,12 @@ static int afpCheckReservedLock(sqlite3_file *id, int *pResOut){
|
||||
int rc = SQLITE_OK;
|
||||
int reserved = 0;
|
||||
unixFile *pFile = (unixFile*)id;
|
||||
afpLockingContext *context;
|
||||
|
||||
SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
|
||||
|
||||
assert( pFile );
|
||||
afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
|
||||
context = (afpLockingContext *) pFile->lockingContext;
|
||||
if( context->reserved ){
|
||||
*pResOut = 1;
|
||||
return SQLITE_OK;
|
||||
@ -2669,7 +2670,7 @@ static int afpLock(sqlite3_file *id, int eFileLock){
|
||||
** operating system calls for the specified lock.
|
||||
*/
|
||||
if( eFileLock==SHARED_LOCK ){
|
||||
int lrc1, lrc2, lrc1Errno;
|
||||
int lrc1, lrc2, lrc1Errno = 0;
|
||||
long lk, mask;
|
||||
|
||||
assert( pInode->nShared==0 );
|
||||
@ -3439,11 +3440,9 @@ static int proxyFileControl(sqlite3_file*,int,void*);
|
||||
|
||||
/*
|
||||
** This function is called to handle the SQLITE_FCNTL_SIZE_HINT
|
||||
** file-control operation.
|
||||
**
|
||||
** If the user has configured a chunk-size for this file, it could be
|
||||
** that the file needs to be extended at this point. Otherwise, the
|
||||
** SQLITE_FCNTL_SIZE_HINT operation is a no-op for Unix.
|
||||
** file-control operation. Enlarge the database to nBytes in size
|
||||
** (rounded up to the next chunk-size). If the database is already
|
||||
** nBytes or larger, this routine is a no-op.
|
||||
*/
|
||||
static int fcntlSizeHint(unixFile *pFile, i64 nByte){
|
||||
{ /* preserve indentation of removed "if" */
|
||||
@ -4957,6 +4956,9 @@ static int unixOpen(
|
||||
#if SQLITE_ENABLE_LOCKING_STYLE
|
||||
int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY);
|
||||
#endif
|
||||
#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
|
||||
struct statfs fsInfo;
|
||||
#endif
|
||||
|
||||
/* If creating a master or main-file journal, this function will open
|
||||
** a file-descriptor on the directory too. The first time unixSync()
|
||||
@ -5089,7 +5091,6 @@ static int unixOpen(
|
||||
|
||||
|
||||
#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
|
||||
struct statfs fsInfo;
|
||||
if( fstatfs(fd, &fsInfo) == -1 ){
|
||||
((unixFile*)pFile)->lastErrno = errno;
|
||||
robust_close(p, fd, __LINE__);
|
||||
@ -5113,7 +5114,6 @@ static int unixOpen(
|
||||
if( envforce!=NULL ){
|
||||
useProxy = atoi(envforce)>0;
|
||||
}else{
|
||||
struct statfs fsInfo;
|
||||
if( statfs(zPath, &fsInfo) == -1 ){
|
||||
/* In theory, the close(fd) call is sub-optimal. If the file opened
|
||||
** with fd is a database file, and there are other connections open
|
||||
@ -5854,6 +5854,8 @@ static int proxyGetHostID(unsigned char *pHostID, int *pError){
|
||||
return SQLITE_IOERR;
|
||||
}
|
||||
}
|
||||
#else
|
||||
UNUSED_PARAMETER(pError);
|
||||
#endif
|
||||
#ifdef SQLITE_TEST
|
||||
/* simulate multiple hosts by creating unique hostid file paths */
|
||||
@ -5946,6 +5948,7 @@ static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){
|
||||
int nTries = 0;
|
||||
struct timespec conchModTime;
|
||||
|
||||
memset(&conchModTime, 0, sizeof(conchModTime));
|
||||
do {
|
||||
rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);
|
||||
nTries ++;
|
||||
@ -6177,11 +6180,12 @@ static int proxyTakeConch(unixFile *pFile){
|
||||
end_takeconch:
|
||||
OSTRACE(("TRANSPROXY: CLOSE %d\n", pFile->h));
|
||||
if( rc==SQLITE_OK && pFile->openFlags ){
|
||||
int fd;
|
||||
if( pFile->h>=0 ){
|
||||
robust_close(pFile, pFile->h, __LINE__);
|
||||
}
|
||||
pFile->h = -1;
|
||||
int fd = robust_open(pCtx->dbPath, pFile->openFlags,
|
||||
fd = robust_open(pCtx->dbPath, pFile->openFlags,
|
||||
SQLITE_DEFAULT_FILE_PERMISSIONS);
|
||||
OSTRACE(("TRANSPROXY: OPEN %d\n", fd));
|
||||
if( fd>=0 ){
|
||||
|
Loading…
Reference in New Issue
Block a user