Clang++ -fsanitize=undefined: Fix invalid code table entries

This commit is contained in:
Shahram Najm 2022-06-02 15:06:01 +01:00
parent b8ae44fccf
commit 76c1e3f2b6
6 changed files with 6 additions and 5 deletions

View File

@ -21,7 +21,7 @@ unsigned[4] longitudeOfTangencyPoint : dump ;
alias Lo1 = longitudeOfTangencyPoint;
# Resolution and component flag
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/3.3.table' : dump ;
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/4.1.table' : dump ;
# Dx - X-direction grid length in units of 10 -3 m as measured at the point of the axis
unsigned[4] Dx : dump ;

View File

@ -33,7 +33,7 @@ signed[4] centralLongitudeInMicrodegrees : dump;
alias centralLongitude=centralLongitudeInMicrodegrees;
# Resolution and component flag
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/3.3.table' : dump ;
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/4.1.table' : dump ;
# Dx - X-direction grid length in millimetres
unsigned[4] xDirectionGridLengthInMillimetres : dump ;

View File

@ -29,7 +29,7 @@ meta geography.longitudeOfFirstGridPointInDegrees scale(longitudeOfFirstGridPoin
alias Lo1 = longitudeOfFirstGridPoint;
# Resolution and component flag
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/3.3.table' : dump;
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/4.1.table' : dump;
# LaD - Latitude where Dx and Dy are specified
signed[4] LaD : edition_specific;

View File

@ -1,7 +1,7 @@
# (C) Copyright 2005- ECMWF.
# Resolution and component flags
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/3.3.table' : edition_specific,no_copy;
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/4.1.table' : edition_specific,no_copy;
# Note our flagbit numbers run from 7 to 0, while WMO convention uses 1 to 8
# (most significant to least significant)

View File

@ -1,7 +1,7 @@
# (C) Copyright 2005- ECMWF.
# Resolution and component flags
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/3.3.table' : edition_specific,no_copy;
flags[1] resolutionAndComponentFlags 'grib3/tables/[tablesVersion]/4.1.table' : edition_specific,no_copy;
# Note our flagbit numbers run from 7 to 0, while WMO convention uses 1 to 8
# (most significant to least significant)

View File

@ -148,6 +148,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* param)
static int test_bit(long a, long b)
{
DebugAssert(b>=0);
return a & (1 << b);
}