mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common/
2010-04-20 Marcus Brinkmann <marcus@g10code.de> * logging.c (do_log_ignore_arg): New helper function. (log_string): Use it to remove ugly volatile hack that causes gcc warning. (log_flush): Likewise. * sysutils.c (gnupg_unsetenv) [!HAVE_W32CE_SYSTEM]: Return something. (gnupg_setenv) [!HAVE_W32CE_SYSTEM]: Likewise. * pka.c (get_pka_info): Solve strict aliasing rule violation. * t-exechelp.c (test_close_all_fds): Use dummy variables to silence gcc warning. kbx/ 2010-04-20 Marcus Brinkmann <marcus@g10code.de> * keybox-update.c [!HAVE_DOSISH_SYSTEM]: Include ../common/sysutils.h even then to silence gcc warning about missing declaration of gnupg_remove. tools/ 2010-04-20 Marcus Brinkmann <marcus@g10code.de> * gpgconf-comp.c (option_check_validity): Use dummy variables to silence gcc warning.
This commit is contained in:
parent
6616ba9a1e
commit
0e960d940a
10 changed files with 77 additions and 35 deletions
|
@ -89,6 +89,8 @@ 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)
|
||||
|
@ -98,14 +100,14 @@ got_fatal_signal (int sig)
|
|||
if (cleanup_fnc)
|
||||
cleanup_fnc ();
|
||||
/* Better don't translate these messages. */
|
||||
write (2, "\n", 1 );
|
||||
res = write (2, "\n", 1 );
|
||||
s = log_get_prefix (NULL);
|
||||
if (s)
|
||||
write(2, s, strlen (s));
|
||||
write (2, ": signal ", 9 );
|
||||
res = write(2, s, strlen (s));
|
||||
res = write (2, ": signal ", 9 );
|
||||
s = get_signal_name(sig);
|
||||
if (s)
|
||||
write (2, s, strlen(s) );
|
||||
res = write (2, s, strlen(s) );
|
||||
else
|
||||
{
|
||||
/* We are in a signal handler so we can't use any kind of printf
|
||||
|
@ -115,7 +117,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)
|
||||
write (2, "?", 1);
|
||||
res = write (2, "?", 1);
|
||||
else
|
||||
{
|
||||
int i, value, any=0;
|
||||
|
@ -124,7 +126,7 @@ got_fatal_signal (int sig)
|
|||
{
|
||||
if (value >= i || ((any || i==1) && !(value/i)))
|
||||
{
|
||||
write (2, "0123456789"+(value/i), 1);
|
||||
res = write (2, "0123456789"+(value/i), 1);
|
||||
if ((value/i))
|
||||
any = 1;
|
||||
value %= i;
|
||||
|
@ -132,7 +134,7 @@ got_fatal_signal (int sig)
|
|||
}
|
||||
}
|
||||
}
|
||||
write (2, " caught ... exiting\n", 20);
|
||||
res = write (2, " caught ... exiting\n", 20);
|
||||
|
||||
/* Reset action to default action and raise signal again */
|
||||
init_one_signal (sig, SIG_DFL, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue