mirror of https://github.com/ecmwf/eccodes.git
Compiler warnings: Microsoft Visual
This commit is contained in:
parent
55bf28d38e
commit
3a9213ab03
|
@ -303,8 +303,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
//value_first = value_first + 0.5; //round up
|
//value_first = value_first + 0.5; //round up
|
||||||
|
|
||||||
// TODO(masn): These maxima should come from the respective accessors
|
// TODO(masn): These maxima should come from the respective accessors
|
||||||
const int64_t scaled_value_max = (1UL << 32) - 1; // scaledValueOf*FixedSurface is 4 octets
|
const int64_t scaled_value_max = (1ULL << 32) - 1; // scaledValueOf*FixedSurface is 4 octets
|
||||||
const int64_t scale_factor_max = (1UL << 8) - 1; // scaleFactorOf*FixedSurface is 1 octet
|
const int64_t scale_factor_max = (1ULL << 8) - 1; // scaleFactorOf*FixedSurface is 1 octet
|
||||||
int64_t lscaled_value=0, lscale_factor=0;
|
int64_t lscaled_value=0, lscale_factor=0;
|
||||||
|
|
||||||
ret = compute_scaled_value_and_scale_factor(value_first, scaled_value_max, scale_factor_max, &lscaled_value, &lscale_factor);
|
ret = compute_scaled_value_and_scale_factor(value_first, scaled_value_max, scale_factor_max, &lscaled_value, &lscale_factor);
|
||||||
|
|
|
@ -184,7 +184,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||||
else {
|
else {
|
||||||
if (value < 0)
|
if (value < 0)
|
||||||
value += 360;
|
value += 360;
|
||||||
longitude = value * 1000000;
|
longitude = (long)(value * 1000000);
|
||||||
}
|
}
|
||||||
return grib_set_long(grib_handle_of_accessor(a), self->longitude, longitude);
|
return grib_set_long(grib_handle_of_accessor(a), self->longitude, longitude);
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,8 +373,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||||
ddi = (360.0 * dfactor) / dNi;
|
ddi = (360.0 * dfactor) / dNi;
|
||||||
dlonlast = (360.0 * dfactor) - ddi + 0.5;
|
dlonlast = (360.0 * dfactor) - ddi + 0.5;
|
||||||
ddi = ddi + 0.5;
|
ddi = ddi + 0.5;
|
||||||
di = ddi;
|
di = (long)ddi;
|
||||||
lonlast = dlonlast;
|
lonlast = (long)dlonlast;
|
||||||
|
|
||||||
grib_context_free(c, lats);
|
grib_context_free(c, lats);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue