1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Work around a sanitizer warning about a pointer being only 4-byte aligned

instead of 8-byte aligned.

FossilOrigin-Name: 1b807b51cdf455b4f54216b73fd22bbc90f94e24222401e045f88cfd27f487e3
This commit is contained in:
drh
2018-06-02 16:32:04 +00:00
parent e893e2e4ee
commit 5ba5f5b5d2
3 changed files with 15 additions and 8 deletions

View File

@@ -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;
}
/*