From 14a8fd4eec126cad282a85c5aa336a6b55229b52 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 19 Oct 2012 11:18:08 +0200 Subject: [PATCH] Avoid warning about initialized but not used variable * src/engine-gpgsm.c (gpgsm_set_fd): Do not set DIR if not needed. --- src/engine-gpgsm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c index 42bf8798..52873ac9 100644 --- a/src/engine-gpgsm.c +++ b/src/engine-gpgsm.c @@ -645,7 +645,9 @@ gpgsm_set_fd (engine_gpgsm_t gpgsm, fd_type_t fd_type, const char *opt) char line[COMMANDLINELEN]; char *which; iocb_data_t *iocb_data; +#if USE_DESCRIPTOR_PASSING int dir; +#endif switch (fd_type) { @@ -668,9 +670,8 @@ gpgsm_set_fd (engine_gpgsm_t gpgsm, fd_type_t fd_type, const char *opt) return gpg_error (GPG_ERR_INV_VALUE); } - dir = iocb_data->dir; - #if USE_DESCRIPTOR_PASSING + dir = iocb_data->dir; /* We try to short-cut the communication by giving GPGSM direct access to the file descriptor, rather than using a pipe. */ iocb_data->server_fd = _gpgme_data_get_fd (iocb_data->data);