summaryrefslogtreecommitdiff
path: root/src/pch.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-10-09 11:40:42 +0200
committerJim Meyering <meyering@redhat.com>2011-12-14 16:34:45 +0100
commit5cb38ce3903b5c33750cd52f983a8f68f945c7dd (patch)
tree8860b967c0cb2ee11834cbb5c01988c44f9e1141 /src/pch.c
parent5ca55b84143a840218bcdc78120b44b02d8ef561 (diff)
downloadpatch-5cb38ce3903b5c33750cd52f983a8f68f945c7dd.tar.gz
build: update to latest gnulib and adapt
Mark functions as pure of const, per recommendations enabled by new gcc -W options. Apply _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST. * src/common.h: Apply new function attributes. * src/pch.c: Likewise. * src/pch.h: Likewise. * src/util.c: Likewise. * src/util.h: Likewise. * configure.ac: Use -Wno-format-nonliteral. * m4/.gitignore: Update. * gnulib: Update to latest. * cfg.mk: Exempt src/util.c from two tests, to avoid new "make syntax-check" failures.
Diffstat (limited to 'src/pch.c')
-rw-r--r--src/pch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pch.c b/src/pch.c
index 6909850..0d0c4b9 100644
--- a/src/pch.c
+++ b/src/pch.c
@@ -315,7 +315,7 @@ there_is_another_patch (bool need_header, mode_t *file_type)
return true;
}
-static mode_t
+static mode_t _GL_ATTRIBUTE_PURE
fetchmode (char const *str)
{
const char *s;
@@ -366,7 +366,7 @@ sha1_says_nonexistent(char const *sha1, char const *end)
return s == end;
}
-static char const *
+static char const * _GL_ATTRIBUTE_PURE
skip_hex_digits (char const *str)
{
char const *s;
@@ -2248,7 +2248,7 @@ pch_mode (bool which)
This accepts just a subset of the valid commands, but it's
good enough in practice. */
-static char
+static char _GL_ATTRIBUTE_PURE
get_ed_command_letter (char const *line)
{
char const *p = line;