diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-09-13 09:34:00 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-09-13 09:34:00 +0200 |
commit | 87d4338ed1d258817d02701127431dc4029fd722 (patch) | |
tree | 2fa594b535907f522fa55bf8b1f359b677bb3714 | |
parent | sm: Fix reporting of bad passphrase error (diff) | |
download | gnupg2-87d4338ed1d258817d02701127431dc4029fd722.tar.xz gnupg2-87d4338ed1d258817d02701127431dc4029fd722.zip |
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>
-rw-r--r-- | common/gettime.c | 2 | ||||
-rw-r--r-- | common/signal.c | 4 | ||||
-rw-r--r-- | common/utf8conv.c | 2 | ||||
-rw-r--r-- | g10/cpr.c | 4 | ||||
-rw-r--r-- | g10/getkey.c | 2 | ||||
-rw-r--r-- | g10/keygen.c | 2 | ||||
-rw-r--r-- | g10/passphrase.c | 4 | ||||
-rw-r--r-- | g10/tdbio.c | 12 | ||||
-rw-r--r-- | g10/trustdb.c | 2 | ||||
-rw-r--r-- | scd/scdaemon.c | 2 | ||||
-rw-r--r-- | sm/passphrase.c | 2 |
11 files changed, 19 insertions, 19 deletions
diff --git a/common/gettime.c b/common/gettime.c index cbf24364e..20d8fa109 100644 --- a/common/gettime.c +++ b/common/gettime.c @@ -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 for tests */ time_t -gnupg_get_time () +gnupg_get_time (void) { time_t current = time (NULL); if (current == (time_t)(-1)) diff --git a/common/signal.c b/common/signal.c index 0200186c1..d308c175c 100644 --- a/common/signal.c +++ b/common/signal.c @@ -239,13 +239,13 @@ do_block (int block) void -gnupg_block_all_signals () +gnupg_block_all_signals (void) { do_block(1); } void -gnupg_unblock_all_signals () +gnupg_unblock_all_signals (void) { do_block(0); } diff --git a/common/utf8conv.c b/common/utf8conv.c index 8b66e7f41..80bfbe3e7 100644 --- a/common/utf8conv.c +++ b/common/utf8conv.c @@ -299,7 +299,7 @@ set_native_charset (const char *newset) } const char * -get_native_charset () +get_native_charset (void) { return active_charset_name; } @@ -128,7 +128,7 @@ set_status_fd (int fd) int -is_status_enabled () +is_status_enabled (void) { return !!statusfp; } @@ -532,7 +532,7 @@ do_get_from_fd ( const char *keyword, int hidden, int getbool ) int -cpr_enabled() +cpr_enabled(void) { if( opt.command_fd != -1 ) return 1; diff --git a/g10/getkey.c b/g10/getkey.c index 3772a8505..6363fea9f 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -260,7 +260,7 @@ user_id_not_found_utf8 (void) cache_public_key and get_pubkey). Note: there is currently no way to re-enable this cache. */ void -getkey_disable_caches () +getkey_disable_caches (void) { #if MAX_PK_CACHE_ENTRIES { diff --git a/g10/keygen.c b/g10/keygen.c index 4bf0995eb..7a79b378f 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -2922,7 +2922,7 @@ ask_expire_interval(int object,const char *def_expire) } u32 -ask_expiredate() +ask_expiredate (void) { u32 x = ask_expire_interval(0,NULL); return x? make_timestamp() + x : 0; diff --git a/g10/passphrase.c b/g10/passphrase.c index 604452d46..c5ec8eae4 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -49,7 +49,7 @@ static char *last_pw = NULL; int -have_static_passphrase() +have_static_passphrase (void) { return (!!fd_passwd && (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: */ char * -get_last_passphrase() +get_last_passphrase (void) { char *p = last_pw; last_pw = NULL; diff --git a/g10/tdbio.c b/g10/tdbio.c index 50dccca05..1b68f772f 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -415,7 +415,7 @@ put_record_into_cache (ulong recno, const char *data) /* Return true if the cache is dirty. */ int -tdbio_is_dirty() +tdbio_is_dirty (void) { return cache_is_dirty; } @@ -425,7 +425,7 @@ tdbio_is_dirty() * Flush the cache. This cannot be used while in a transaction. */ int -tdbio_sync() +tdbio_sync (void) { CACHE_CTRL r; 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. */ const char * -tdbio_get_dbname () +tdbio_get_dbname (void) { return db_name; } @@ -777,7 +777,7 @@ tdbio_get_dbname () * the trustdb handle (DB_FD) is guaranteed to be open. */ static void -open_db () +open_db (void) { TRUSTREC rec; @@ -859,7 +859,7 @@ create_hashtable (ctrl_t ctrl, TRUSTREC *vr, int type) * Return: 1 for yes, 0 for no. */ int -tdbio_db_matches_options() +tdbio_db_matches_options (void) { static int yes_no = -1; @@ -916,7 +916,7 @@ tdbio_read_model (void) * problem the process is terminated. */ ulong -tdbio_read_nextcheck () +tdbio_read_nextcheck (void) { TRUSTREC vr; int rc; diff --git a/g10/trustdb.c b/g10/trustdb.c index e8cd62d5f..7e2486446 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -544,7 +544,7 @@ setup_trustdb( int level, const char *dbname ) } void -how_to_fix_the_trustdb () +how_to_fix_the_trustdb (void) { const char *name = trustdb_args.dbname; diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 6d068d3d3..e43769f85 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -998,7 +998,7 @@ scd_deinit_default_ctrl (ctrl_t ctrl) /* Return the name of the socket to be used to connect to this process. If no socket is available, return NULL. */ const char * -scd_get_socket_name () +scd_get_socket_name (void) { if (socket_name && *socket_name) return socket_name; diff --git a/sm/passphrase.c b/sm/passphrase.c index 09eac07dc..becf61df5 100644 --- a/sm/passphrase.c +++ b/sm/passphrase.c @@ -29,7 +29,7 @@ static char *fd_passwd = NULL; int -have_static_passphrase () +have_static_passphrase (void) { return (!!fd_passwd && (opt.batch || opt.pinentry_mode == PINENTRY_MODE_LOOPBACK)); |