aboutsummaryrefslogtreecommitdiffstats
path: root/common/signal.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common/signal.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/common/signal.c b/common/signal.c
index 9f11b9922..28b2acc2e 100644
--- a/common/signal.c
+++ b/common/signal.c
@@ -89,8 +89,6 @@ get_signal_name( int signum )
static RETSIGTYPE
got_fatal_signal (int sig)
{
- /* Dummy result variable to suppress gcc warning. */
- int res;
const char *s;
if (caught_fatal_sig)
@@ -100,14 +98,14 @@ got_fatal_signal (int sig)
if (cleanup_fnc)
cleanup_fnc ();
/* Better don't translate these messages. */
- res = write (2, "\n", 1 );
+ (void)write (2, "\n", 1 );
s = log_get_prefix (NULL);
if (s)
- res = write(2, s, strlen (s));
- res = write (2, ": signal ", 9 );
+ (void)write(2, s, strlen (s));
+ (void)write (2, ": signal ", 9 );
s = get_signal_name(sig);
if (s)
- res = write (2, s, strlen(s) );
+ (void) write (2, s, strlen(s) );
else
{
/* We are in a signal handler so we can't use any kind of printf
@@ -117,7 +115,7 @@ got_fatal_signal (int sig)
things are messed up because we modify its value. Although
this is a bug in that system, we will protect against it. */
if (sig < 0 || sig >= 100000)
- res = write (2, "?", 1);
+ (void)write (2, "?", 1);
else
{
int i, value, any=0;
@@ -126,7 +124,7 @@ got_fatal_signal (int sig)
{
if (value >= i || ((any || i==1) && !(value/i)))
{
- res = write (2, "0123456789"+(value/i), 1);
+ (void)write (2, "0123456789"+(value/i), 1);
if ((value/i))
any = 1;
value %= i;
@@ -134,7 +132,7 @@ got_fatal_signal (int sig)
}
}
}
- res = write (2, " caught ... exiting\n", 20);
+ (void)write (2, " caught ... exiting\n", 20);
/* Reset action to default action and raise signal again */
init_one_signal (sig, SIG_DFL, 0);