From d8fdb88440a784d910abc656c2a55a1c5724f4d0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 1 Mar 2011 09:37:07 +0100 Subject: 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. --- src/patch.c | 2 +- src/pch.h | 2 +- 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]; diff --git a/src/pch.h b/src/pch.h index 74f766c..8a72ad0 100644 --- a/src/pch.h +++ b/src/pch.h @@ -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 -#undef XTERN -#define XTERN #include static char const copyright_string[] = "\ -- cgit v1.2.1