diff --git a/base/data-struct/hash.c b/base/data-struct/hash.c index db3dcd543..7ef33c11b 100644 --- a/base/data-struct/hash.c +++ b/base/data-struct/hash.c @@ -41,7 +41,7 @@ struct dm_hash_table { static unsigned _hash(const void *key, unsigned len) { /* Permutation of the Integers 0 through 255 */ - static unsigned char _nums[] = { + static const unsigned char _nums[] = { 1, 14, 110, 25, 97, 174, 132, 119, 138, 170, 125, 118, 27, 233, 140, 51, 87, 197, 177, 107, 234, 169, 56, 68, 30, 7, 173, 73, 188, 40, 36, 65, 49, 213, 104, 190, 57, 211, 148, 223, 48, 115, 15, 2, 67, 186, 210, 28, diff --git a/libdm/datastruct/hash.c b/libdm/datastruct/hash.c index 054f5c359..b0ccc3a60 100644 --- a/libdm/datastruct/hash.c +++ b/libdm/datastruct/hash.c @@ -30,7 +30,7 @@ struct dm_hash_table { }; /* Permutation of the Integers 0 through 255 */ -static unsigned char _nums[] = { +static const unsigned char _nums[] = { 1, 14, 110, 25, 97, 174, 132, 119, 138, 170, 125, 118, 27, 233, 140, 51, 87, 197, 177, 107, 234, 169, 56, 68, 30, 7, 173, 73, 188, 40, 36, 65, 49, 213, 104, 190, 57, 211, 148, 223, 48, 115, 15, 2, 67, 186, 210, 28, diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 66eb71238..7629a0ba6 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -2946,7 +2946,7 @@ static int _service_time(const struct dm_stats *dms, double *svctm, typedef int (*_metric_fn_t)(const struct dm_stats *, double *, uint64_t, uint64_t); -_metric_fn_t _metrics[DM_STATS_NR_METRICS] = { +const _metric_fn_t _metrics[DM_STATS_NR_METRICS] = { _rd_merges_per_sec, _wr_merges_per_sec, _reads_per_sec,