From 908690cb743e69c73b42ae310807b29800c8764b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 29 Nov 2011 14:25:56 +0100 Subject: [PATCH] hash: mark compute_bucket_size with the pure attribute * lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE. --- ChangeLog | 3 +++ lib/hash.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dddd33380..15118d941 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-11-29 Jim Meyering + hash: mark compute_bucket_size with the pure attribute + * lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE. + quotearg, propername: correct pragma guard expression * lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer. * lib/propername.c: Likewise. Reported by Bernhard Voelker. diff --git a/lib/hash.c b/lib/hash.c index a0e641670..1dd657a6a 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -540,7 +540,7 @@ check_tuning (Hash_table *table) TUNING, or return 0 if there is no possible way to allocate that many entries. */ -static size_t +static size_t _GL_ATTRIBUTE_PURE compute_bucket_size (size_t candidate, const Hash_tuning *tuning) { if (!tuning->is_n_buckets) -- 2.11.0