[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] c-stack: avoid defining an unused static function
From: |
Jim Meyering |
Subject: |
[PATCH] c-stack: avoid defining an unused static function |
Date: |
Sun, 22 Nov 2009 17:12:33 +0100 |
FYI, find_stack_direction was defined but not used.
>From 1398c0de968352891dfaaf26d4f8bf6676e5b060 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 22 Nov 2009 17:11:14 +0100
Subject: [PATCH] c-stack: avoid defining an unused static function
* lib/c-stack.c (find_stack_direction): Do not define this function
when it will not be used.
---
ChangeLog | 4 ++++
lib/c-stack.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9f8d4ef..9b37d6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-11-22 Jim Meyering <address@hidden>
+ c-stack: avoid defining an unused static function
+ * lib/c-stack.c (find_stack_direction): Do not define this function
+ when it will not be used.
+
diffseq: avoid spurious gcc warnings
* lib/diffseq.h (IF_LINT2): Define.
(compareseq): Use it to initialize two members of "part".
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 044272c..1ee3560 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -218,12 +218,14 @@ c_stack_action (void (*action) (int))
# if STACK_DIRECTION
# define find_stack_direction(ptr) STACK_DIRECTION
# else
+# if ! SIGACTION_WORKS || HAVE_XSI_STACK_OVERFLOW_HEURISTIC
static int
find_stack_direction (char const *addr)
{
char dummy;
return ! addr ? find_stack_direction (&dummy) : addr < &dummy ? 1 : -1;
}
+# endif
# endif
# if SIGACTION_WORKS
--
1.6.5.3.502.gc3e2e
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] c-stack: avoid defining an unused static function,
Jim Meyering <=