From: Marcus Brinkmann Date: Thu, 30 Oct 2008 15:08:44 +0000 (+0000) Subject: assuan/ X-Git-Tag: gpgme-1.1.8~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6405d54bad459072ec8e5cad3d6538be564854af;p=gpgme.git assuan/ 2008-10-30 Marcus Brinkmann * assuan-pipe-connect.c: Fix prototype for _gpgme_io_spawn. Cast second argument in its invocation to silence gcc warning. gpgme/ 2008-10-30 Marcus Brinkmann * wait-private.c (_gpgme_wait_on_condition): Remove unused variable IDX. * wait-global.c: Include ops.h to silence gcc warning. (_gpgme_wait_global_event_cb): Pass error value directly. * wait-user.c: Include ops.h to silence gcc warning. * posix-io.c (_gpgme_io_spawn): Make ARGV argument const to silence gcc warning. Cast argument to execv to silence warning. * w32-io.c (_gpgme_io_spawn): Likewise. * priv-io.h (_gpgme_io_spawn): Likewise for prototype. --- diff --git a/assuan/ChangeLog b/assuan/ChangeLog index 2e01943..cf15674 100644 --- a/assuan/ChangeLog +++ b/assuan/ChangeLog @@ -1,3 +1,8 @@ +2008-10-30 Marcus Brinkmann + + * assuan-pipe-connect.c: Fix prototype for _gpgme_io_spawn. Cast + second argument in its invocation to silence gcc warning. + 2008-06-25 Marcus Brinkmann * assuan-pipe-connect.c (struct spawn_fd_item_s): Add new members. diff --git a/assuan/assuan-pipe-connect.c b/assuan/assuan-pipe-connect.c index a0091c6..e355532 100644 --- a/assuan/assuan-pipe-connect.c +++ b/assuan/assuan-pipe-connect.c @@ -52,7 +52,7 @@ struct spawn_fd_item_s int _gpgme_io_pipe (int filedes[2], int inherit_idx); -int _gpgme_io_spawn (const char *path, char **argv, +int _gpgme_io_spawn (const char *path, char *const argv[], struct spawn_fd_item_s *fd_list, pid_t *r_pid); #endif @@ -665,7 +665,7 @@ pipe_connect_gpgme (assuan_context_t *ctx, child_fds[nr].dup_to = -1; /* Start the process. */ - res = _gpgme_io_spawn (name, argv, child_fds, NULL); + res = _gpgme_io_spawn (name, (char *const *) argv, child_fds, NULL); if (res == -1) { _assuan_log_printf ("CreateProcess failed: %s\n", strerror (errno)); diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index f848d18..9a8a749 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,16 @@ +2008-10-30 Marcus Brinkmann + + * wait-private.c (_gpgme_wait_on_condition): Remove unused + variable IDX. + * wait-global.c: Include ops.h to silence gcc warning. + (_gpgme_wait_global_event_cb): Pass error value directly. + * wait-user.c: Include ops.h to silence gcc warning. + + * posix-io.c (_gpgme_io_spawn): Make ARGV argument const to + silence gcc warning. Cast argument to execv to silence warning. + * w32-io.c (_gpgme_io_spawn): Likewise. + * priv-io.h (_gpgme_io_spawn): Likewise for prototype. + 2008-10-24 Werner Koch * rungpg.c (gpg_keylist_preprocess): Escape backslashes too. diff --git a/gpgme/posix-io.c b/gpgme/posix-io.c index 8c68882..a7047bd 100644 --- a/gpgme/posix-io.c +++ b/gpgme/posix-io.c @@ -304,7 +304,7 @@ _gpgme_io_waitpid (int pid, int hang, int *r_status, int *r_signal) /* Returns 0 on success, -1 on error. */ int -_gpgme_io_spawn (const char *path, char **argv, +_gpgme_io_spawn (const char *path, char *const argv[], struct spawn_fd_item_s *fd_list, pid_t *r_pid) { pid_t pid; @@ -427,7 +427,7 @@ _gpgme_io_spawn (const char *path, char **argv, close (fd); } - execv (path, argv); + execv (path, (char *const *) argv); /* Hmm: in that case we could write a special status code to the status-pipe. */ #if 0 diff --git a/gpgme/priv-io.h b/gpgme/priv-io.h index 90a385d..4a87f65 100644 --- a/gpgme/priv-io.h +++ b/gpgme/priv-io.h @@ -63,7 +63,7 @@ int _gpgme_io_set_nonblocking (int fd); close all fds except for those in FD_LIST in the child, then optionally dup() the child fds. Finally, all fds in the list are closed in the parent. */ -int _gpgme_io_spawn (const char *path, char **argv, +int _gpgme_io_spawn (const char *path, char *const argv[], struct spawn_fd_item_s *fd_list, pid_t *r_pid); int _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock); diff --git a/gpgme/w32-io.c b/gpgme/w32-io.c index e90f779..1f62a6f 100644 --- a/gpgme/w32-io.c +++ b/gpgme/w32-io.c @@ -1009,7 +1009,7 @@ build_commandline (char **argv) int -_gpgme_io_spawn (const char *path, char **argv, +_gpgme_io_spawn (const char *path, char *const argv[], struct spawn_fd_item_s *fd_list, pid_t *r_pid) { SECURITY_ATTRIBUTES sec_attr; diff --git a/gpgme/wait-global.c b/gpgme/wait-global.c index 1ab44d1..ececc1b 100644 --- a/gpgme/wait-global.c +++ b/gpgme/wait-global.c @@ -33,6 +33,7 @@ #include "context.h" #include "wait.h" #include "priv-io.h" +#include "ops.h" /* The global event loop is used for all asynchronous operations (except key listing) for which no user I/O callbacks are specified. @@ -202,7 +203,7 @@ _gpgme_wait_global_event_cb (void *data, gpgme_event_io_t type, if (err) /* An error occured. Close all fds in this context, and send the error in a done event. */ - _gpgme_cancel_with_err (ctx, &err); + _gpgme_cancel_with_err (ctx, err); } break; diff --git a/gpgme/wait-private.c b/gpgme/wait-private.c index 0366057..2dee1a9 100644 --- a/gpgme/wait-private.c +++ b/gpgme/wait-private.c @@ -86,8 +86,6 @@ _gpgme_wait_on_condition (gpgme_ctx_t ctx, volatile int *cond) { /* An error occured. Close all fds in this context, and signal it. */ - unsigned int idx; - err = gpg_error_from_errno (errno); _gpgme_cancel_with_err (ctx, err); diff --git a/gpgme/wait-user.c b/gpgme/wait-user.c index 05750e2..995657f 100644 --- a/gpgme/wait-user.c +++ b/gpgme/wait-user.c @@ -28,6 +28,7 @@ #include "context.h" #include "priv-io.h" #include "wait.h" +#include "ops.h" /* The user event loops are used for all asynchronous operations for