Index: src/os.c ================================================================== --- src/os.c +++ src/os.c @@ -79,17 +79,15 @@ ** The following routines are convenience wrappers around methods ** of the sqlite3_file object. This is mostly just syntactic sugar. All ** of this would be completely automatic if SQLite were coded using ** C++ instead of plain old C. */ -int sqlite3OsClose(sqlite3_file *pId){ - int rc = SQLITE_OK; +void sqlite3OsClose(sqlite3_file *pId){ if( pId->pMethods ){ - rc = pId->pMethods->xClose(pId); + pId->pMethods->xClose(pId); pId->pMethods = 0; } - return rc; } int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){ DO_OS_MALLOC_TEST(id); return id->pMethods->xRead(id, pBuf, amt, offset); } @@ -303,16 +301,14 @@ }else{ rc = SQLITE_NOMEM_BKPT; } return rc; } -int sqlite3OsCloseFree(sqlite3_file *pFile){ - int rc = SQLITE_OK; +void sqlite3OsCloseFree(sqlite3_file *pFile){ assert( pFile ); - rc = sqlite3OsClose(pFile); + sqlite3OsClose(pFile); sqlite3_free(pFile); - return rc; } /* ** This function is a wrapper around the OS specific implementation of ** sqlite3_os_init(). The purpose of the wrapper is to provide the Index: src/os.h ================================================================== --- src/os.h +++ src/os.h @@ -158,11 +158,11 @@ int sqlite3OsInit(void); /* ** Functions for accessing sqlite3_file methods */ -int sqlite3OsClose(sqlite3_file*); +void sqlite3OsClose(sqlite3_file*); int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset); int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset); int sqlite3OsTruncate(sqlite3_file*, i64 size); int sqlite3OsSync(sqlite3_file*, int); int sqlite3OsFileSize(sqlite3_file*, i64 *pSize); @@ -203,8 +203,8 @@ /* ** Convenience functions for opening and closing files using ** sqlite3_malloc() to obtain space for the file-handle structure. */ int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*); -int sqlite3OsCloseFree(sqlite3_file *); +void sqlite3OsCloseFree(sqlite3_file *); #endif /* _SQLITE_OS_H_ */ Index: src/test_devsym.c ================================================================== --- src/test_devsym.c +++ src/test_devsym.c @@ -131,11 +131,12 @@ /* ** Close an devsym-file. */ static int devsymClose(sqlite3_file *pFile){ devsym_file *p = (devsym_file *)pFile; - return sqlite3OsClose(p->pReal); + sqlite3OsClose(p->pReal); + return SQLITE_OK; } /* ** Read data from an devsym-file. */ Index: src/test_journal.c ================================================================== --- src/test_journal.c +++ src/test_journal.c @@ -254,11 +254,12 @@ if( p->zName ){ for(pp=&g.pList; *pp!=p; pp=&(*pp)->pNext); *pp = p->pNext; } leaveJtMutex(); - return sqlite3OsClose(p->pReal); + sqlite3OsClose(p->pReal); + return SQLITE_OK; } /* ** Read data from an jt-file. */ Index: src/test_vfs.c ================================================================== --- src/test_vfs.c +++ src/test_vfs.c @@ -304,11 +304,10 @@ /* ** Close an tvfs-file. */ static int tvfsClose(sqlite3_file *pFile){ - int rc; TestvfsFile *pTestfile = (TestvfsFile *)pFile; TestvfsFd *pFd = pTestfile->pFd; Testvfs *p = (Testvfs *)pFd->pVfs->pAppData; if( p->pScript && p->mask&TESTVFS_CLOSE_MASK ){ @@ -322,14 +321,14 @@ pFd->pShmId = 0; } if( pFile->pMethods ){ ckfree((char *)pFile->pMethods); } - rc = sqlite3OsClose(pFd->pReal); + sqlite3OsClose(pFd->pReal); ckfree((char *)pFd); pTestfile->pFd = 0; - return rc; + return SQLITE_OK; } /* ** Read data from an tvfs-file. */