bug-patch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-patch] [PATCH 09/15] build: avoid three gcc warnings


From: Jim Meyering
Subject: [bug-patch] [PATCH 09/15] build: avoid three gcc warnings
Date: Sat, 26 Mar 2011 14:32:04 +0100

From: Jim Meyering <address@hidden>

* 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 <common.h>
-#undef XTERN
-#define XTERN
 #include <version.h>

 static char const copyright_string[] = "\
-- 
1.7.1.354.ge64bd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]