gpg: Silent more compiler warnings due to some configure options.

* g10/keygen.c (generate_keypair, gen_card_key)
(gen_card_key_with_backup) [!ENABLE_CARD_SUPPORT]: Mark unused args.
This commit is contained in:
Werner Koch 2014-02-10 23:12:28 +01:00
parent 672f4aeba8
commit 47e6b6bad1
1 changed files with 22 additions and 1 deletions

View File

@ -3377,6 +3377,10 @@ generate_keypair (ctrl_t ctrl, const char *fname, const char *card_serialno,
struct para_data_s *r;
struct output_control_s outctrl;
#ifndef ENABLE_CARD_SUPPORT
(void)card_backup_key;
#endif
memset( &outctrl, 0, sizeof( outctrl ) );
if (opt.batch && card_serialno)
@ -4265,6 +4269,12 @@ gen_card_key (int algo, int keyno, int is_primary, kbnode_t pub_root,
return 0;
#else
(void)algo;
(void)keyno;
(void)is_primary;
(void)pub_root;
(void)timestamp;
(void)expireval;
return gpg_error (GPG_ERR_NOT_SUPPORTED);
#endif /*!ENABLE_CARD_SUPPORT*/
}
@ -4276,7 +4286,8 @@ gen_card_key_with_backup (int algo, int keyno, int is_primary,
KBNODE pub_root, u32 timestamp,
u32 expireval, struct para_data_s *para)
{
#if 0 /* FIXME: Move this to gpg-agent. */
#if ENABLE_CARD_SUPPORT && 0
/* FIXME: Move this to gpg-agent. */
int rc;
const char *s;
PACKET *pkt;
@ -4433,6 +4444,16 @@ gen_card_key_with_backup (int algo, int keyno, int is_primary,
return 0;
#else
# if __GCC__ && ENABLE_CARD_SUPPORT
# warning Card support still missing
# endif
(void)algo;
(void)keyno;
(void)is_primary;
(void)pub_root;
(void)timestamp;
(void)expireval;
(void)para;
return gpg_error (GPG_ERR_NOT_SUPPORTED);
#endif /*!ENABLE_CARD_SUPPORT*/
}