mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
Avoid incompatible pointer assignment warnings on Windows.
* common/logging.c (fun_writer): Use gpgrt_ssize_t instead of ssize_t. * dirmngr/server.c (data_line_cookie_write): Ditto. * sm/certdump.c (format_name_writer): Ditto. * sm/server.c (data_line_cookie_write): Ditto. * dirmngr/http.c (cookie_read, cookie_write): Ditto. -- See the release notes of libgpg-error 1.15 for background info on gpgrt_ssize_t. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
100f34e869
commit
64e8708339
@ -195,7 +195,7 @@ parse_portno (const char *str, unsigned short *r_port)
|
||||
}
|
||||
|
||||
|
||||
static ssize_t
|
||||
static gpgrt_ssize_t
|
||||
fun_writer (void *cookie_arg, const void *buffer, size_t size)
|
||||
{
|
||||
struct fun_cookie_s *cookie = cookie_arg;
|
||||
@ -391,11 +391,11 @@ fun_writer (void *cookie_arg, const void *buffer, size_t size)
|
||||
DWORD nwritten;
|
||||
|
||||
WriteFile ((HANDLE)cookie->fd, buffer, size, &nwritten, NULL);
|
||||
return (ssize_t)size; /* Okay. */
|
||||
return (gpgrt_ssize_t)size; /* Okay. */
|
||||
}
|
||||
#endif
|
||||
if (!writen (cookie->fd, buffer, size, cookie->is_socket))
|
||||
return (ssize_t)size; /* Okay. */
|
||||
return (gpgrt_ssize_t)size; /* Okay. */
|
||||
}
|
||||
|
||||
if (!running_detached && cookie->fd != -1
|
||||
@ -415,7 +415,7 @@ fun_writer (void *cookie_arg, const void *buffer, size_t size)
|
||||
log_socket = -1;
|
||||
}
|
||||
|
||||
return (ssize_t)size;
|
||||
return (gpgrt_ssize_t)size;
|
||||
}
|
||||
|
||||
|
||||
|
@ -169,8 +169,9 @@ static assuan_fd_t connect_server (const char *server, unsigned short port,
|
||||
int *r_host_not_found);
|
||||
static gpg_error_t write_server (int sock, const char *data, size_t length);
|
||||
|
||||
static ssize_t cookie_read (void *cookie, void *buffer, size_t size);
|
||||
static ssize_t cookie_write (void *cookie, const void *buffer, size_t size);
|
||||
static gpgrt_ssize_t cookie_read (void *cookie, void *buffer, size_t size);
|
||||
static gpgrt_ssize_t cookie_write (void *cookie,
|
||||
const void *buffer, size_t size);
|
||||
static int cookie_close (void *cookie);
|
||||
|
||||
|
||||
@ -2415,7 +2416,7 @@ write_server (int sock, const char *data, size_t length)
|
||||
|
||||
|
||||
/* Read handler for estream. */
|
||||
static ssize_t
|
||||
static gpgrt_ssize_t
|
||||
cookie_read (void *cookie, void *buffer, size_t size)
|
||||
{
|
||||
cookie_t c = cookie;
|
||||
@ -2497,11 +2498,11 @@ cookie_read (void *cookie, void *buffer, size_t size)
|
||||
c->content_length = 0;
|
||||
}
|
||||
|
||||
return nread;
|
||||
return (gpgrt_ssize_t)nread;
|
||||
}
|
||||
|
||||
/* Write handler for estream. */
|
||||
static ssize_t
|
||||
static gpgrt_ssize_t
|
||||
cookie_write (void *cookie, const void *buffer_arg, size_t size)
|
||||
{
|
||||
const char *buffer = buffer_arg;
|
||||
@ -2550,7 +2551,7 @@ cookie_write (void *cookie, const void *buffer_arg, size_t size)
|
||||
nwritten = size;
|
||||
}
|
||||
|
||||
return nwritten;
|
||||
return (gpgrt_ssize_t)nwritten;
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,8 +95,8 @@ struct server_local_s
|
||||
|
||||
|
||||
/* Cookie definition for assuan data line output. */
|
||||
static ssize_t data_line_cookie_write (void *cookie,
|
||||
const void *buffer, size_t size);
|
||||
static gpgrt_ssize_t data_line_cookie_write (void *cookie,
|
||||
const void *buffer, size_t size);
|
||||
static int data_line_cookie_close (void *cookie);
|
||||
static es_cookie_io_functions_t data_line_cookie_functions =
|
||||
{
|
||||
@ -210,14 +210,14 @@ data_line_write (assuan_context_t ctx, const void *buffer_arg, size_t size)
|
||||
|
||||
/* A write handler used by es_fopencookie to write assuan data
|
||||
lines. */
|
||||
static ssize_t
|
||||
static gpgrt_ssize_t
|
||||
data_line_cookie_write (void *cookie, const void *buffer, size_t size)
|
||||
{
|
||||
assuan_context_t ctx = cookie;
|
||||
|
||||
if (data_line_write (ctx, buffer, size))
|
||||
return -1;
|
||||
return (ssize_t)size;
|
||||
return (gpgrt_ssize_t)size;
|
||||
}
|
||||
|
||||
|
||||
|
@ -652,7 +652,7 @@ struct format_name_cookie
|
||||
};
|
||||
|
||||
/* The writer function for the memory stream. */
|
||||
static ssize_t
|
||||
static gpgrt_ssize_t
|
||||
format_name_writer (void *cookie, const void *buffer, size_t size)
|
||||
{
|
||||
struct format_name_cookie *c = cookie;
|
||||
@ -696,7 +696,7 @@ format_name_writer (void *cookie, const void *buffer, size_t size)
|
||||
c->len += size;
|
||||
p[c->len] = 0; /* Terminate string. */
|
||||
|
||||
return (ssize_t)size;
|
||||
return (gpgrt_ssize_t)size;
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,8 +55,8 @@ struct server_local_s {
|
||||
|
||||
|
||||
/* Cookie definition for assuan data line output. */
|
||||
static ssize_t data_line_cookie_write (void *cookie,
|
||||
const void *buffer, size_t size);
|
||||
static gpgrt_ssize_t data_line_cookie_write (void *cookie,
|
||||
const void *buffer, size_t size);
|
||||
static int data_line_cookie_close (void *cookie);
|
||||
static es_cookie_io_functions_t data_line_cookie_functions =
|
||||
{
|
||||
@ -129,7 +129,7 @@ has_option (const char *line, const char *name)
|
||||
|
||||
/* A write handler used by es_fopencookie to write assuan data
|
||||
lines. */
|
||||
static ssize_t
|
||||
static gpgrt_ssize_t
|
||||
data_line_cookie_write (void *cookie, const void *buffer, size_t size)
|
||||
{
|
||||
assuan_context_t ctx = cookie;
|
||||
@ -140,7 +140,7 @@ data_line_cookie_write (void *cookie, const void *buffer, size_t size)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return size;
|
||||
return (gpgrt_ssize_t)size;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user