mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:03:02 +01:00
-Fix cast warnings
This commit is contained in:
parent
452515713a
commit
1c33c685f3
@ -235,7 +235,8 @@ rec_err:
|
|||||||
memcpy(d->dsc_address, var->sqldata, length);
|
memcpy(d->dsc_address, var->sqldata, length);
|
||||||
if (d->dsc_scale != var->sqlscale) {
|
if (d->dsc_scale != var->sqlscale) {
|
||||||
double DeltaPow = pow(10, var->sqlscale - d->dsc_scale);
|
double DeltaPow = pow(10, var->sqlscale - d->dsc_scale);
|
||||||
# define ReScaleLike(t) *((t *)d->dsc_address) *= DeltaPow
|
// To avoid compiler warning don't use the *= operator and cast the right side
|
||||||
|
# define ReScaleLike(t) *((t *)d->dsc_address) = static_cast<t>(*((t *)d->dsc_address) * DeltaPow)
|
||||||
switch (d->dsc_dtype) {
|
switch (d->dsc_dtype) {
|
||||||
case dtype_short:
|
case dtype_short:
|
||||||
ReScaleLike(SSHORT);
|
ReScaleLike(SSHORT);
|
||||||
|
Loading…
Reference in New Issue
Block a user