aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-06-02 16:32:04 +0000
committerdrh <drh@noemail.net>2018-06-02 16:32:04 +0000
commit5ba5f5b5d27d9daac87c438bc56ac9cc56796e07 (patch)
tree019ce4da64bd8fbf9cbf9635b335b3723c7764fb /src
parente893e2e4eec8820ca7d1613c94b0e38c83ae9fb3 (diff)
downloadsqlite-5ba5f5b5d27d9daac87c438bc56ac9cc56796e07.tar.gz
sqlite-5ba5f5b5d27d9daac87c438bc56ac9cc56796e07.zip
Work around a sanitizer warning about a pointer being only 4-byte aligned
instead of 8-byte aligned. FossilOrigin-Name: 1b807b51cdf455b4f54216b73fd22bbc90f94e24222401e045f88cfd27f487e3
Diffstat (limited to 'src')
-rw-r--r--src/btree.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index a73896e16..fb3b89fe1 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -864,7 +864,11 @@ static int btreeRestoreCursorPosition(BtCursor *pCur){
** back to where it ought to be if this routine returns true.
*/
int sqlite3BtreeCursorHasMoved(BtCursor *pCur){
- return pCur->eState!=CURSOR_VALID;
+ assert( EIGHT_BYTE_ALIGNMENT(pCur)
+ || pCur==sqlite3BtreeFakeValidCursor() );
+ assert( offsetof(BtCursor, eState)==0 );
+ assert( sizeof(pCur->eState)==1 );
+ return CURSOR_VALID != *(u8*)pCur;
}
/*