summaryrefslogtreecommitdiff
path: root/sed/utils.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2014-11-06 21:14:08 -0600
committerJim Meyering <meyering@fb.com>2014-11-30 21:08:32 -0800
commit157626b785aaae6220257a23c55eb5686f4e3dbd (patch)
tree6af251e42588924a982625315c2f70762c1adc9e /sed/utils.c
parente09428778d1eb17a157e73e369f8f966fbcc8842 (diff)
downloadsed-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.c6
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;
}