Compiler warnings: Microsoft Visual

This commit is contained in:
Shahram Najm 2023-04-21 11:16:06 +01:00
parent 55bf28d38e
commit 3a9213ab03
3 changed files with 5 additions and 5 deletions

View File

@ -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
// 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 scale_factor_max = (1UL << 8) - 1; // scaleFactorOf*FixedSurface is 1 octet
const int64_t scaled_value_max = (1ULL << 32) - 1; // scaledValueOf*FixedSurface is 4 octets
const int64_t scale_factor_max = (1ULL << 8) - 1; // scaleFactorOf*FixedSurface is 1 octet
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);

View File

@ -184,7 +184,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
else {
if (value < 0)
value += 360;
longitude = value * 1000000;
longitude = (long)(value * 1000000);
}
return grib_set_long(grib_handle_of_accessor(a), self->longitude, longitude);
}

View File

@ -373,8 +373,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
ddi = (360.0 * dfactor) / dNi;
dlonlast = (360.0 * dfactor) - ddi + 0.5;
ddi = ddi + 0.5;
di = ddi;
lonlast = dlonlast;
di = (long)ddi;
lonlast = (long)dlonlast;
grib_context_free(c, lats);