Index: third_party/sqlite/src/src/memjournal.c |
diff --git a/third_party/sqlite/src/src/memjournal.c b/third_party/sqlite/src/src/memjournal.c |
index df770b44ed3a7a3c091bb76de5f6323e37b33eb8..3e66e215b2a84af474fa7fee9084c7ff6c3c4f6c 100644 |
--- a/third_party/sqlite/src/src/memjournal.c |
+++ b/third_party/sqlite/src/src/memjournal.c |
@@ -13,8 +13,6 @@ |
** This file contains code use to implement an in-memory rollback journal. |
** The in-memory rollback journal is used to journal transactions for |
** ":memory:" databases and when the journal_mode=MEMORY pragma is used. |
-** |
-** @(#) $Id: memjournal.c,v 1.12 2009/05/04 11:42:30 danielk1977 Exp $ |
*/ |
#include "sqliteInt.h" |
@@ -198,11 +196,10 @@ static int memjrnlClose(sqlite3_file *pJfd){ |
** exists purely as a contingency, in case some malfunction in some other |
** part of SQLite causes Sync to be called by mistake. |
*/ |
-static int memjrnlSync(sqlite3_file *NotUsed, int NotUsed2){ /*NO_TEST*/ |
- UNUSED_PARAMETER2(NotUsed, NotUsed2); /*NO_TEST*/ |
- assert( 0 ); /*NO_TEST*/ |
- return SQLITE_OK; /*NO_TEST*/ |
-} /*NO_TEST*/ |
+static int memjrnlSync(sqlite3_file *NotUsed, int NotUsed2){ |
+ UNUSED_PARAMETER2(NotUsed, NotUsed2); |
+ return SQLITE_OK; |
+} |
/* |
** Query the size of the file in bytes. |
@@ -216,7 +213,7 @@ static int memjrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){ |
/* |
** Table of methods for MemJournal sqlite3_file object. |
*/ |
-static struct sqlite3_io_methods MemJournalMethods = { |
+static const struct sqlite3_io_methods MemJournalMethods = { |
1, /* iVersion */ |
memjrnlClose, /* xClose */ |
memjrnlRead, /* xRead */ |
@@ -229,7 +226,11 @@ static struct sqlite3_io_methods MemJournalMethods = { |
0, /* xCheckReservedLock */ |
0, /* xFileControl */ |
0, /* xSectorSize */ |
- 0 /* xDeviceCharacteristics */ |
+ 0, /* xDeviceCharacteristics */ |
+ 0, /* xShmMap */ |
+ 0, /* xShmLock */ |
+ 0, /* xShmBarrier */ |
+ 0 /* xShmUnlock */ |
}; |
/* |
@@ -239,7 +240,7 @@ void sqlite3MemJournalOpen(sqlite3_file *pJfd){ |
MemJournal *p = (MemJournal *)pJfd; |
assert( EIGHT_BYTE_ALIGNMENT(p) ); |
memset(p, 0, sqlite3MemJournalSize()); |
- p->pMethod = &MemJournalMethods; |
+ p->pMethod = (sqlite3_io_methods*)&MemJournalMethods; |
} |
/* |
@@ -251,8 +252,7 @@ int sqlite3IsMemJournal(sqlite3_file *pJfd){ |
} |
/* |
-** Return the number of bytes required to store a MemJournal that uses vfs |
-** pVfs to create the underlying on-disk files. |
+** Return the number of bytes required to store a MemJournal file descriptor. |
*/ |
int sqlite3MemJournalSize(void){ |
return sizeof(MemJournal); |