mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix compiler warnings in LSM1, especially in the test logic.
FossilOrigin-Name: 9bd3be92b8add7bd0d7bc4b0742b2dd227ebb8d67a839b78f26f2b06b47490f2
This commit is contained in:
@ -459,7 +459,10 @@ static int lsm1Column(
|
||||
if( aVal[0]==SQLITE_INTEGER ){
|
||||
sqlite3_result_int64(ctx, *(sqlite3_int64*)&x);
|
||||
}else{
|
||||
sqlite3_result_double(ctx, *(double*)&x);
|
||||
double r;
|
||||
assert( sizeof(r)==sizeof(x) );
|
||||
memcpy(&r, &x, sizeof(r));
|
||||
sqlite3_result_double(ctx, r);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -666,7 +669,9 @@ int lsm1Update(
|
||||
if( eType==SQLITE_INTEGER ){
|
||||
*(sqlite3_int64*)&x = sqlite3_value_int64(pValue);
|
||||
}else{
|
||||
*(double*)&x = sqlite3_value_double(pValue);
|
||||
double r = sqlite3_value_double(pValue);
|
||||
assert( sizeof(r)==sizeof(x) );
|
||||
memcpy(&x, &r, sizeof(r));
|
||||
}
|
||||
for(i=8; x>0 && i>=1; i--){
|
||||
aVal[i] = x & 0xff;
|
||||
|
Reference in New Issue
Block a user