aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine-gpgconf.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-09-13 18:57:15 +0000
committerWerner Koch <[email protected]>2016-09-13 18:57:15 +0000
commit686a065f639ef006e33c164e282d787bcd169754 (patch)
tree6f9cff1a74c6015a0e725e1af0f2e6156fa4b65a /src/engine-gpgconf.c
parentcore: Fix condition-always-true warning in trace macro. (diff)
downloadgpgme-686a065f639ef006e33c164e282d787bcd169754.tar.gz
gpgme-686a065f639ef006e33c164e282d787bcd169754.zip
core: Cast away the common const problem with spawn and argv.
* src/dirinfo.c (read_gpgconf_dirs): Use a cast to assignd to ARGV. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/engine-gpgconf.c')
-rw-r--r--src/engine-gpgconf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c
index d5e7e2b9..015ef001 100644
--- a/src/engine-gpgconf.c
+++ b/src/engine-gpgconf.c
@@ -200,7 +200,7 @@ gpgconf_config_release (gpgme_conf_comp_t conf)
allow for quite a long "group" line, which is usually the longest
line (mine is currently ~3k). */
static gpgme_error_t
-gpgconf_read (void *engine, char *arg1, char *arg2,
+gpgconf_read (void *engine, const char *arg1, char *arg2,
gpgme_error_t (*cb) (void *hook, char *line),
void *hook)
{
@@ -217,7 +217,7 @@ gpgconf_read (void *engine, char *arg1, char *arg2,
int nread;
char *mark = NULL;
- argv[1] = arg1;
+ argv[1] = (char*)arg1;
argv[2] = arg2;
@@ -678,14 +678,14 @@ _gpgme_conf_opt_change (gpgme_conf_opt_t opt, int reset, gpgme_conf_arg_t arg)
/* FIXME: Major problem: We don't get errors from gpgconf. */
static gpgme_error_t
-gpgconf_write (void *engine, char *arg1, char *arg2, gpgme_data_t conf)
+gpgconf_write (void *engine, const char *arg1, char *arg2, gpgme_data_t conf)
{
struct engine_gpgconf *gpgconf = engine;
gpgme_error_t err = 0;
#define BUFLEN 1024
char buf[BUFLEN];
int buflen = 0;
- char *argv[] = { NULL /* file_name */, arg1, arg2, 0 };
+ char *argv[] = { NULL /* file_name */, (char*)arg1, arg2, 0 };
int rp[2];
struct spawn_fd_item_s cfd[] = { {-1, 0 /* STDIN_FILENO */}, {-1, -1} };
int status;