diff options
author | Jim Meyering <meyering@redhat.com> | 2011-03-01 09:37:07 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-03-27 09:16:45 +0200 |
commit | d8fdb88440a784d910abc656c2a55a1c5724f4d0 (patch) | |
tree | 5eba4d728d0eed2384afa1eaf248c915df2def78 | |
parent | 38cecf52b68d730b0e4c2ae0ea37d5997b8e6276 (diff) | |
download | patch-d8fdb88440a784d910abc656c2a55a1c5724f4d0.tar.gz |
build: avoid three gcc warnings
* src/patch.c (mangled_patch): Add "noreturn" attribute.
* src/pch.h (pch_timestamp): Remove ignored "const" attribute.
* src/version.c (XTERN): Remove unused #undef and #define.
-rw-r--r-- | src/patch.c | 2 | ||||
-rw-r--r-- | src/pch.h | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/src/patch.c b/src/patch.c index 372e0f0..364d28e 100644 --- a/src/patch.c +++ b/src/patch.c @@ -1094,7 +1094,7 @@ locate_hunk (lin fuzz) return 0; } -static void +static void __attribute__ ((noreturn)) mangled_patch (lin old, lin new) { char numbuf0[LINENUM_LENGTH_BOUND + 1]; @@ -54,7 +54,7 @@ XTERN struct timespec p_timestamp[2]; /* timestamps in patch headers */ or a timestamp with tv_sec == -1 if there was no timestamp or an error in the timestamp. */ -static inline const struct timespec pch_timestamp (bool which) +static inline struct timespec pch_timestamp (bool which) { return p_timestamp[which]; } diff --git a/src/version.c b/src/version.c index 2a00bf6..58936ae 100644 --- a/src/version.c +++ b/src/version.c @@ -2,8 +2,6 @@ #define XTERN extern #include <common.h> -#undef XTERN -#define XTERN #include <version.h> static char const copyright_string[] = "\ |