From dfefe1b390bb5d15d7ef3e0564378a8139d2d335 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 19 Apr 2010 16:59:23 +0000 Subject: [PATCH] 2010-04-19 Marcus Brinkmann * assuan-support.c (my_spawn): Cast to avoid warning. * engine-g13.c (g13_new): Make ARGV array of pointer to const char. (g13_assuan_simple_command) [!USE_DESCRIPTOR_FUNCTION]: Don't define. * ops.h (_gpgme_key_append_name): Same in prototype. * key.c (_gpgme_key_append_name): Make SRC argument pointer to const char. * posix-util.c (_gpgme_get_uiserver_socket_path): Make HOMEDIR const. * vfs-mount.c (gpgme_op_vfs_transact_start): Never define this potentially useful but currently unused function. * vfs-create.c (gpgme_op_vfs_transact_start): Likewise. --- src/ChangeLog | 15 +++++++++++++++ src/assuan-support.c | 4 ++-- src/engine-g13.c | 4 +++- src/key.c | 2 +- src/ops.h | 2 +- src/posix-util.c | 2 +- src/vfs-create.c | 3 ++- src/vfs-mount.c | 2 ++ 8 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d4ef220..839ef6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2010-04-19 Marcus Brinkmann + + * assuan-support.c (my_spawn): Cast to avoid warning. + * engine-g13.c (g13_new): Make ARGV array of pointer to const + char. + (g13_assuan_simple_command) [!USE_DESCRIPTOR_FUNCTION]: Don't define. + * ops.h (_gpgme_key_append_name): Same in prototype. + * key.c (_gpgme_key_append_name): Make SRC argument pointer to + const char. + * posix-util.c (_gpgme_get_uiserver_socket_path): Make HOMEDIR + const. + * vfs-mount.c (gpgme_op_vfs_transact_start): Never define this + potentially useful but currently unused function. + * vfs-create.c (gpgme_op_vfs_transact_start): Likewise. + 2010-04-16 Werner Koch * w32-io.c (is_socket): New. diff --git a/src/assuan-support.c b/src/assuan-support.c index c4d390c..7b2a725 100644 --- a/src/assuan-support.c +++ b/src/assuan-support.c @@ -158,8 +158,8 @@ my_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name, fd_items[i].fd = -1; fd_items[i].dup_to = -1; - err = _gpgme_io_spawn (name, argv, IOSPAWN_FLAG_NOCLOSE, fd_items, - atfork, atforkvalue, r_pid); + err = _gpgme_io_spawn (name, (char*const*)argv, IOSPAWN_FLAG_NOCLOSE, + fd_items, atfork, atforkvalue, r_pid); if (! err) { i = 0; diff --git a/src/engine-g13.c b/src/engine-g13.c index 7ccca92..07cfe7f 100644 --- a/src/engine-g13.c +++ b/src/engine-g13.c @@ -211,7 +211,7 @@ g13_new (void **engine, const char *file_name, const char *home_dir) gpgme_error_t err = 0; engine_g13_t g13; int argc; - char *argv[5]; + const char *argv[5]; char *dft_display = NULL; char dft_ttyname[64]; char *dft_ttytype = NULL; @@ -392,6 +392,7 @@ g13_set_locale (void *engine, int category, const char *value) } +#if USE_DESCRIPTOR_PASSING static gpgme_error_t g13_assuan_simple_command (assuan_context_t ctx, char *cmd, engine_status_handler_t status_fnc, @@ -442,6 +443,7 @@ g13_assuan_simple_command (assuan_context_t ctx, char *cmd, return err; } +#endif static gpgme_error_t diff --git a/src/key.c b/src/key.c index 7dd38c5..37db81d 100644 --- a/src/key.c +++ b/src/key.c @@ -202,7 +202,7 @@ parse_x509_user_id (char *src, char **name, char **email, /* Take a name from the --with-colon listing, remove certain escape sequences sequences and put it into the list of UIDs. */ gpgme_error_t -_gpgme_key_append_name (gpgme_key_t key, char *src, int convert) +_gpgme_key_append_name (gpgme_key_t key, const char *src, int convert) { gpgme_user_id_t uid; char *dst; diff --git a/src/ops.h b/src/ops.h index 46c28ee..7b3025b 100644 --- a/src/ops.h +++ b/src/ops.h @@ -128,7 +128,7 @@ gpgme_error_t _gpgme_progress_status_handler (void *priv, gpgme_error_t _gpgme_key_new (gpgme_key_t *r_key); gpgme_error_t _gpgme_key_add_subkey (gpgme_key_t key, gpgme_subkey_t *r_subkey); -gpgme_error_t _gpgme_key_append_name (gpgme_key_t key, char *src, int convert); +gpgme_error_t _gpgme_key_append_name (gpgme_key_t key, const char *src, int convert); gpgme_key_sig_t _gpgme_key_add_sig (gpgme_key_t key, char *src); diff --git a/src/posix-util.c b/src/posix-util.c index 3acc7e0..d7ed8f0 100644 --- a/src/posix-util.c +++ b/src/posix-util.c @@ -74,7 +74,7 @@ const char * _gpgme_get_uiserver_socket_path (void) { static char *socket_path; - char *homedir; + const char *homedir; const char name[] = "S.uiserver"; if (socket_path) diff --git a/src/vfs-create.c b/src/vfs-create.c index 9a65e0c..142549a 100644 --- a/src/vfs-create.c +++ b/src/vfs-create.c @@ -58,7 +58,7 @@ vfs_start (gpgme_ctx_t ctx, int synchronous, } - +#if 0 /* XXXX. This is the asynchronous variant. */ static gpgme_error_t gpgme_op_vfs_transact_start (gpgme_ctx_t ctx, @@ -73,6 +73,7 @@ gpgme_op_vfs_transact_start (gpgme_ctx_t ctx, return vfs_start (ctx, 0, command, data_cb, data_cb_value, inq_cb, inq_cb_value, status_cb, status_cb_value); } +#endif /* XXXX. This is the synchronous variant. */ diff --git a/src/vfs-mount.c b/src/vfs-mount.c index f5a6286..b913689 100644 --- a/src/vfs-mount.c +++ b/src/vfs-mount.c @@ -116,6 +116,7 @@ vfs_start (gpgme_ctx_t ctx, int synchronous, +#if 0 /* XXXX. This is the asynchronous variant. */ static gpgme_error_t gpgme_op_vfs_transact_start (gpgme_ctx_t ctx, @@ -130,6 +131,7 @@ gpgme_op_vfs_transact_start (gpgme_ctx_t ctx, return vfs_start (ctx, 0, command, data_cb, data_cb_value, inq_cb, inq_cb_value, status_cb, status_cb_value); } +#endif /* XXXX. This is the synchronous variant. */ -- 2.26.2