8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00

-Fix cast warnings

This commit is contained in:
brodsom 2003-08-10 10:41:51 +00:00
parent 452515713a
commit 1c33c685f3

View File

@ -235,7 +235,8 @@ rec_err:
memcpy(d->dsc_address, var->sqldata, length);
if (d->dsc_scale != var->sqlscale) {
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) {
case dtype_short:
ReScaleLike(SSHORT);