NCEPLIBS-g2c
NCEPLIBS-g2c copied to clipboard
should section 1 values be stored as unsigned ints?
trafficstars
We have:
int num_fields; /**< Number of fields in the message. */
int num_local; /**< Number of local sections in the message. */
int bytes_to_local; /**< Number of bytes in the message before the (first) local section. */
int bytes_to_bms; /**< Number of bytes in the message to the bitmap section. */
int bytes_to_data; /**< Number of bytes in the message to the (first) data section. */
int num_sections; /**< Number of sections in the file. */
Should these be unsigned ints?
Looking at info here: https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_sect1.shtml and the code in grib2_int.h and I see the following that need to be size_t:
int bytes_to_local; /**< Number of bytes in the message before the (first) local section. */
int bytes_to_bms; /**< Number of bytes in the message to the bitmap section. */
int bytes_to_data; /**< Number of bytes in the message to the (first) data section. */
OK, I made all the necessary changes to types as part of the reading > 2GB file changes.
I will close this issue.