# HG changeset patch # User Jim Meyering # Date 1258906274 -3600 # Node ID d6110537824ba3acc4abbc5b95768316c103312b # Parent 911f28ebb9c4a7254bd6d099f14ceb4b8524d420 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-11-22 Jim Meyering + 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 --- a/lib/c-stack.c +++ b/lib/c-stack.c @@ -218,12 +218,14 @@ # 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