diff options
author | Jim Meyering <meyering@fb.com> | 2020-10-25 10:04:19 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2020-10-26 07:47:36 -0700 |
commit | cc816fb978113370ff9eac41891f256bf217dffc (patch) | |
tree | 2439896c05e50e462a23c1368802c8f8268b17b1 | |
parent | 4278e6615f319c13799749c37990ffb39c733edf (diff) |
maint: avoid new sort.c warning from upcoming GCC11
gcc version 11.0.0 20201025 (experimental) warns that
src/sort.c:1655:1: warning: function might be candidate for attribute \
'pure' if it is known to return normally [-Wsuggest-attribute=pure]
* src/sort.c (limfield): Mark as pure.
-rw-r--r-- | src/sort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c index 0163ba18a..8671ea767 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1651,7 +1651,7 @@ begfield (struct line const *line, struct keyfield const *key) /* Return the limit of (a pointer to the first character after) the field in LINE specified by KEY. */ -static char * +static char * _GL_ATTRIBUTE_PURE limfield (struct line const *line, struct keyfield const *key) { char *ptr = line->text, *lim = ptr + line->length - 1; |