diff --git a/src/grib_bits_any_endian.c b/src/grib_bits_any_endian.c index 362f11fe2..411d902bc 100644 --- a/src/grib_bits_any_endian.c +++ b/src/grib_bits_any_endian.c @@ -97,7 +97,7 @@ int grib_encode_string(unsigned char* bitStream, long* bitOffset, size_t numberO int remainder = *bitOffset % 8; unsigned char c; unsigned char* p; - unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + const unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; int remainderComplement = 8 - remainder; char str[512] = {0,}; char* s = str; diff --git a/src/grib_bits_fast_big_endian.c b/src/grib_bits_fast_big_endian.c index 4a50349dc..b47dcfcc7 100644 --- a/src/grib_bits_fast_big_endian.c +++ b/src/grib_bits_fast_big_endian.c @@ -90,7 +90,7 @@ char* grib_decode_string(const unsigned char* bitStream, long* bitOffset, size_t unsigned char c; unsigned char* p; char* s = string; - unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + const unsigned char mask[] = { 0, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; int remainderComplement = 8 - remainder; if (numberOfCharacters == 0) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 0ba3be713..f105094ae 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -131,7 +131,7 @@ static void pj_authset(double es, double* APA) APA[1] += t * P11; APA[2] = t * P20; } -static double pj_authlat(double beta, double* APA) +static double pj_authlat(double beta, const double* APA) { double t = beta + beta; return (beta + APA[0] * sin(t) + APA[1] * sin(t + t) + APA[2] * sin(t + t + t));