diff options
author | Jim Meyering <meyering@fb.com> | 2014-11-06 21:14:08 -0600 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-11-30 21:08:32 -0800 |
commit | 157626b785aaae6220257a23c55eb5686f4e3dbd (patch) | |
tree | 6af251e42588924a982625315c2f70762c1adc9e /sed/utils.c | |
parent | e09428778d1eb17a157e73e369f8f966fbcc8842 (diff) | |
download | sed-157626b785aaae6220257a23c55eb5686f4e3dbd.tar.gz |
maint: avoid more gcc warnings: apply _GL_ATTRIBUTE_PURE
* sed/utils.h (get_buffer, size_buffer): Make each functions
sole parameter "const" and declare the function itself with the
"pure" attribute.
* sed/utils.c (get_buffer, size_buffer): Adjust definitions to match.
Diffstat (limited to 'sed/utils.c')
-rw-r--r-- | sed/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sed/utils.c b/sed/utils.c index ec9b2e6..f8fa031 100644 --- a/sed/utils.c +++ b/sed/utils.c @@ -81,7 +81,7 @@ panic(const char *str, ...) /* Internal routine to get a filename from open_files */ -static const char * +static const char * _GL_ATTRIBUTE_PURE utils_fp_name(FILE *fp) { struct open_file *p; @@ -477,13 +477,13 @@ init_buffer(void) } char * -get_buffer(struct buffer *b) +get_buffer(struct buffer const *b) { return b->b; } size_t -size_buffer(struct buffer *b) +size_buffer(struct buffer const *b) { return b->length; } |