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

Remove an unreachable branch in the numericType() helper routine.

FossilOrigin-Name: a99cc008e46ab1a4fdbe2fa87202d026a10c57be55e3e9fedd935795ed6dc694
This commit is contained in:
drh
2022-08-08 13:04:08 +00:00
parent a3a4da0922
commit 5e10d892d6
3 changed files with 15 additions and 14 deletions

View File

@@ -478,17 +478,18 @@ static u16 SQLITE_NOINLINE computeNumericType(Mem *pMem){
** But it does set pMem->u.r and pMem->u.i appropriately.
*/
static u16 numericType(Mem *pMem){
if( pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal) ){
assert( (pMem->flags & MEM_Null)==0
|| pMem->db==0 || pMem->db->mallocFailed );
if( pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) ){
testcase( pMem->flags & MEM_Int );
testcase( pMem->flags & MEM_Real );
testcase( pMem->flags & MEM_IntReal );
return pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal);
}
if( pMem->flags & (MEM_Str|MEM_Blob) ){
testcase( pMem->flags & MEM_Str );
testcase( pMem->flags & MEM_Blob );
return computeNumericType(pMem);
return pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null);
}
assert( pMem->flags & (MEM_Str|MEM_Blob) );
testcase( pMem->flags & MEM_Str );
testcase( pMem->flags & MEM_Blob );
return computeNumericType(pMem);
return 0;
}