From fbf6ece78b6ad0efeab49c2e148b8720ee26c41c Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sat, 1 Oct 2005 20:17:03 +0000 Subject: [PATCH] 2005-10-01 Marcus Brinkmann * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type of ARGV parameter const in prototype. * assuan-pipe-connect.c (assuan_pipe_connect, assuan_pipe_connect2): Likewise in declaration. (assuan_pipe_connect2): Add braindead cast to make execv happy. --- assuan/ChangeLog | 6 ++++++ assuan/assuan-pipe-connect.c | 10 +++++----- assuan/assuan.h | 6 ++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/assuan/ChangeLog b/assuan/ChangeLog index 4f83552..3aef839 100644 --- a/assuan/ChangeLog +++ b/assuan/ChangeLog @@ -1,5 +1,11 @@ 2005-10-01 Marcus Brinkmann + * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type + of ARGV parameter const in prototype. + * assuan-pipe-connect.c (assuan_pipe_connect, + assuan_pipe_connect2): Likewise in declaration. + (assuan_pipe_connect2): Add braindead cast to make execv happy. + * assuan-client.c (assuan_transact): Change LINE, S and D from unsigned char * to char * to silence gcc warning. * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast diff --git a/assuan/assuan-pipe-connect.c b/assuan/assuan-pipe-connect.c index cbc131f..ecedb16 100644 --- a/assuan/assuan-pipe-connect.c +++ b/assuan/assuan-pipe-connect.c @@ -1,5 +1,5 @@ /* assuan-pipe-connect.c - Establish a pipe connection (client) - * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -245,7 +245,7 @@ create_inheritable_pipe (int filedes[2], int for_write) function should only act if the second value is 0. */ assuan_error_t assuan_pipe_connect2 (assuan_context_t *ctx, - const char *name, char *const argv[], + const char *name, const char *const argv[], int *fd_child_list, void (*atfork) (void *opaque, int reserved), void *atforkvalue) @@ -554,7 +554,7 @@ assuan_pipe_connect2 (assuan_context_t *ctx, initialized. */ setenv ("_assuan_pipe_connect_pid", mypidstr, 1); - execv (name, argv); + execv (name, (char *const *) argv); /* oops - use the pipe to tell the parent about it */ snprintf (errbuf, sizeof(errbuf)-1, "ERR %d can't exec `%s': %.50s\n", @@ -612,8 +612,8 @@ assuan_pipe_connect2 (assuan_context_t *ctx, vector in ARGV. FD_CHILD_LIST is a -1 terminated list of file descriptors not to close in the child. */ assuan_error_t -assuan_pipe_connect (assuan_context_t *ctx, const char *name, char *const argv[], - int *fd_child_list) +assuan_pipe_connect (assuan_context_t *ctx, const char *name, + const char *const argv[], int *fd_child_list) { return assuan_pipe_connect2 (ctx, name, argv, fd_child_list, NULL, NULL); } diff --git a/assuan/assuan.h b/assuan/assuan.h index 68336ed..b2641b2 100644 --- a/assuan/assuan.h +++ b/assuan/assuan.h @@ -365,9 +365,11 @@ int assuan_init_connected_socket_server (assuan_context_t *r_ctx, int fd); /*-- assuan-pipe-connect.c --*/ assuan_error_t assuan_pipe_connect (assuan_context_t *ctx, const char *name, - char *const argv[], int *fd_child_list); + const char *const argv[], + int *fd_child_list); assuan_error_t assuan_pipe_connect2 (assuan_context_t *ctx, const char *name, - char *const argv[], int *fd_child_list, + const char *const argv[], + int *fd_child_list, void (*atfork) (void*, int), void *atforkvalue); /*-- assuan-socket-connect.c --*/ -- 2.26.2