mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg,common,scd,sm: Function prototype fixes for modern compiler.
* common/gettime.c (gnupg_get_time): It has no arguments. * common/signal.c (gnupg_block_all_signals): Likewise. (gnupg_unblock_all_signals): Likewise. * common/utf8conv.c (get_native_charset): Likewise. * g10/cpr.c (is_status_enabled, cpr_enabled): Likewise. * g10/getkey.c (getkey_disable_caches): Likewise. * g10/keygen.c (ask_expiredate): Likewise. * g10/passphrase.c (have_static_passphrase): Likewise. (get_last_passphrase): Likewise. * g10/tdbio.c (tdbio_is_dirty, tdbio_sync): Likewise. (tdbio_get_dbname, open_db, tdbio_db_matches_options): Likewise. (tdbio_read_nextcheck): Likewise. * g10/trustdb.c (how_to_fix_the_trustdb): Likewise. * scd/scdaemon.c (scd_get_socket_name): Likewise. * sm/passphrase.c (have_static_passphrase): Likewise. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
a47b3a4087
commit
87d4338ed1
@ -64,7 +64,7 @@ static enum { NORMAL = 0, FROZEN, FUTURE, PAST } timemode;
|
|||||||
/* Wrapper for the time(3). We use this here so we can fake the time
|
/* Wrapper for the time(3). We use this here so we can fake the time
|
||||||
for tests */
|
for tests */
|
||||||
time_t
|
time_t
|
||||||
gnupg_get_time ()
|
gnupg_get_time (void)
|
||||||
{
|
{
|
||||||
time_t current = time (NULL);
|
time_t current = time (NULL);
|
||||||
if (current == (time_t)(-1))
|
if (current == (time_t)(-1))
|
||||||
|
@ -239,13 +239,13 @@ do_block (int block)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gnupg_block_all_signals ()
|
gnupg_block_all_signals (void)
|
||||||
{
|
{
|
||||||
do_block(1);
|
do_block(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnupg_unblock_all_signals ()
|
gnupg_unblock_all_signals (void)
|
||||||
{
|
{
|
||||||
do_block(0);
|
do_block(0);
|
||||||
}
|
}
|
||||||
|
@ -299,7 +299,7 @@ set_native_charset (const char *newset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
get_native_charset ()
|
get_native_charset (void)
|
||||||
{
|
{
|
||||||
return active_charset_name;
|
return active_charset_name;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ set_status_fd (int fd)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
is_status_enabled ()
|
is_status_enabled (void)
|
||||||
{
|
{
|
||||||
return !!statusfp;
|
return !!statusfp;
|
||||||
}
|
}
|
||||||
@ -532,7 +532,7 @@ do_get_from_fd ( const char *keyword, int hidden, int getbool )
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
cpr_enabled()
|
cpr_enabled(void)
|
||||||
{
|
{
|
||||||
if( opt.command_fd != -1 )
|
if( opt.command_fd != -1 )
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -260,7 +260,7 @@ user_id_not_found_utf8 (void)
|
|||||||
cache_public_key and get_pubkey). Note: there is currently no way
|
cache_public_key and get_pubkey). Note: there is currently no way
|
||||||
to re-enable this cache. */
|
to re-enable this cache. */
|
||||||
void
|
void
|
||||||
getkey_disable_caches ()
|
getkey_disable_caches (void)
|
||||||
{
|
{
|
||||||
#if MAX_PK_CACHE_ENTRIES
|
#if MAX_PK_CACHE_ENTRIES
|
||||||
{
|
{
|
||||||
|
@ -2922,7 +2922,7 @@ ask_expire_interval(int object,const char *def_expire)
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32
|
u32
|
||||||
ask_expiredate()
|
ask_expiredate (void)
|
||||||
{
|
{
|
||||||
u32 x = ask_expire_interval(0,NULL);
|
u32 x = ask_expire_interval(0,NULL);
|
||||||
return x? make_timestamp() + x : 0;
|
return x? make_timestamp() + x : 0;
|
||||||
|
@ -49,7 +49,7 @@ static char *last_pw = NULL;
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
have_static_passphrase()
|
have_static_passphrase (void)
|
||||||
{
|
{
|
||||||
return (!!fd_passwd
|
return (!!fd_passwd
|
||||||
&& (opt.batch || opt.pinentry_mode == PINENTRY_MODE_LOOPBACK));
|
&& (opt.batch || opt.pinentry_mode == PINENTRY_MODE_LOOPBACK));
|
||||||
@ -89,7 +89,7 @@ set_next_passphrase( const char *s )
|
|||||||
* the caller must free the result. May return NULL:
|
* the caller must free the result. May return NULL:
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
get_last_passphrase()
|
get_last_passphrase (void)
|
||||||
{
|
{
|
||||||
char *p = last_pw;
|
char *p = last_pw;
|
||||||
last_pw = NULL;
|
last_pw = NULL;
|
||||||
|
12
g10/tdbio.c
12
g10/tdbio.c
@ -415,7 +415,7 @@ put_record_into_cache (ulong recno, const char *data)
|
|||||||
|
|
||||||
/* Return true if the cache is dirty. */
|
/* Return true if the cache is dirty. */
|
||||||
int
|
int
|
||||||
tdbio_is_dirty()
|
tdbio_is_dirty (void)
|
||||||
{
|
{
|
||||||
return cache_is_dirty;
|
return cache_is_dirty;
|
||||||
}
|
}
|
||||||
@ -425,7 +425,7 @@ tdbio_is_dirty()
|
|||||||
* Flush the cache. This cannot be used while in a transaction.
|
* Flush the cache. This cannot be used while in a transaction.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
tdbio_sync()
|
tdbio_sync (void)
|
||||||
{
|
{
|
||||||
CACHE_CTRL r;
|
CACHE_CTRL r;
|
||||||
int did_lock = 0;
|
int did_lock = 0;
|
||||||
@ -765,7 +765,7 @@ tdbio_set_dbname (ctrl_t ctrl, const char *new_dbname,
|
|||||||
* Return the full name of the trustdb.
|
* Return the full name of the trustdb.
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
tdbio_get_dbname ()
|
tdbio_get_dbname (void)
|
||||||
{
|
{
|
||||||
return db_name;
|
return db_name;
|
||||||
}
|
}
|
||||||
@ -777,7 +777,7 @@ tdbio_get_dbname ()
|
|||||||
* the trustdb handle (DB_FD) is guaranteed to be open.
|
* the trustdb handle (DB_FD) is guaranteed to be open.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
open_db ()
|
open_db (void)
|
||||||
{
|
{
|
||||||
TRUSTREC rec;
|
TRUSTREC rec;
|
||||||
|
|
||||||
@ -859,7 +859,7 @@ create_hashtable (ctrl_t ctrl, TRUSTREC *vr, int type)
|
|||||||
* Return: 1 for yes, 0 for no.
|
* Return: 1 for yes, 0 for no.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
tdbio_db_matches_options()
|
tdbio_db_matches_options (void)
|
||||||
{
|
{
|
||||||
static int yes_no = -1;
|
static int yes_no = -1;
|
||||||
|
|
||||||
@ -916,7 +916,7 @@ tdbio_read_model (void)
|
|||||||
* problem the process is terminated.
|
* problem the process is terminated.
|
||||||
*/
|
*/
|
||||||
ulong
|
ulong
|
||||||
tdbio_read_nextcheck ()
|
tdbio_read_nextcheck (void)
|
||||||
{
|
{
|
||||||
TRUSTREC vr;
|
TRUSTREC vr;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -544,7 +544,7 @@ setup_trustdb( int level, const char *dbname )
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
how_to_fix_the_trustdb ()
|
how_to_fix_the_trustdb (void)
|
||||||
{
|
{
|
||||||
const char *name = trustdb_args.dbname;
|
const char *name = trustdb_args.dbname;
|
||||||
|
|
||||||
|
@ -998,7 +998,7 @@ scd_deinit_default_ctrl (ctrl_t ctrl)
|
|||||||
/* Return the name of the socket to be used to connect to this
|
/* Return the name of the socket to be used to connect to this
|
||||||
process. If no socket is available, return NULL. */
|
process. If no socket is available, return NULL. */
|
||||||
const char *
|
const char *
|
||||||
scd_get_socket_name ()
|
scd_get_socket_name (void)
|
||||||
{
|
{
|
||||||
if (socket_name && *socket_name)
|
if (socket_name && *socket_name)
|
||||||
return socket_name;
|
return socket_name;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
static char *fd_passwd = NULL;
|
static char *fd_passwd = NULL;
|
||||||
|
|
||||||
int
|
int
|
||||||
have_static_passphrase ()
|
have_static_passphrase (void)
|
||||||
{
|
{
|
||||||
return (!!fd_passwd
|
return (!!fd_passwd
|
||||||
&& (opt.batch || opt.pinentry_mode == PINENTRY_MODE_LOOPBACK));
|
&& (opt.batch || opt.pinentry_mode == PINENTRY_MODE_LOOPBACK));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user