1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Fixed set but unused variable bugs

This commit is contained in:
Werner Koch 2011-08-10 14:11:30 +02:00
parent 14442d2be0
commit 816bee1fa0
23 changed files with 84 additions and 80 deletions

View file

@ -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);