mirror of https://github.com/ecmwf/eccodes.git
Const correctness
This commit is contained in:
parent
95b0a7ed6e
commit
ae936516c0
|
@ -674,7 +674,7 @@ int codes_bufr_extract_headers_malloc(grib_context* c, const char* filename, cod
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
static char* codes_bufr_header_get_centre_name(long edition, long centre_code)
|
||||
static const char* codes_bufr_header_get_centre_name(long edition, long centre_code)
|
||||
{
|
||||
switch (centre_code) {
|
||||
case 1:
|
||||
|
@ -856,7 +856,7 @@ int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* v
|
|||
*len = sprintf(val, "%ld", bh->bufrHeaderCentre);
|
||||
|
||||
else if (strcmp(key, "centre") == 0) {
|
||||
char* centre_str = codes_bufr_header_get_centre_name(bh->edition, bh->bufrHeaderCentre);
|
||||
const char* centre_str = codes_bufr_header_get_centre_name(bh->edition, bh->bufrHeaderCentre);
|
||||
if (centre_str)
|
||||
*len = sprintf(val, "%s", centre_str);
|
||||
else
|
||||
|
|
|
@ -56,6 +56,7 @@ TESTS = definitions.sh \
|
|||
grib_padding.sh \
|
||||
grib_lamb_az_eq_area.sh \
|
||||
grib_lambert_conformal.sh \
|
||||
grib_mercator.sh \
|
||||
grib_to_netcdf.sh \
|
||||
grib_dump_debug.sh \
|
||||
grib_jpeg.sh \
|
||||
|
|
Loading…
Reference in New Issue