Fix printing size_t and off_t value for LLP64 Windows.
* src/debug.h (_trace_sysres_off_t): Use 'z' length specifier. * src/w32-io.c (_gpgme_io_read): Likewise. (writer, _gpgme_io_write): Likewise. -- GnuPG-bug-id: 7187 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
8b4171680c
commit
de60684500
@ -164,7 +164,7 @@ static inline gpgme_off_t
|
|||||||
_trace_sysres_off_t (gpgme_off_t res, int lvl, const char *func, int line)
|
_trace_sysres_off_t (gpgme_off_t res, int lvl, const char *func, int line)
|
||||||
{
|
{
|
||||||
if (res >= 0)
|
if (res >= 0)
|
||||||
_gpgme_debug (NULL, lvl, 3, func, NULL, NULL, "result=%ld", res);
|
_gpgme_debug (NULL, lvl, 3, func, NULL, NULL, "result=%zd", (size_t)res);
|
||||||
else
|
else
|
||||||
_gpgme_debug (NULL, lvl, -1, NULL, NULL, NULL,
|
_gpgme_debug (NULL, lvl, -1, NULL, NULL, NULL,
|
||||||
"%s:%d: error: %s (%d)\n",
|
"%s:%d: error: %s (%d)\n",
|
||||||
|
@ -680,7 +680,7 @@ _gpgme_io_read (int fd, void *buffer, size_t count)
|
|||||||
int nread;
|
int nread;
|
||||||
struct reader_context_s *ctx;
|
struct reader_context_s *ctx;
|
||||||
TRACE_BEG (DEBUG_SYSIO, "_gpgme_io_read", fd,
|
TRACE_BEG (DEBUG_SYSIO, "_gpgme_io_read", fd,
|
||||||
"buffer=%p, count=%u", buffer, count);
|
"buffer=%p, count=%zd", buffer, count);
|
||||||
|
|
||||||
ctx = find_reader (fd);
|
ctx = find_reader (fd);
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
@ -793,7 +793,7 @@ writer (void *arg)
|
|||||||
}
|
}
|
||||||
UNLOCK (ctx->mutex);
|
UNLOCK (ctx->mutex);
|
||||||
|
|
||||||
TRACE_LOG ("%s %d bytes", sock?"sending":"writing", ctx->nbytes);
|
TRACE_LOG ("%s %zd bytes", sock?"sending":"writing", ctx->nbytes);
|
||||||
|
|
||||||
/* Note that CTX->nbytes is not zero at this point, because
|
/* Note that CTX->nbytes is not zero at this point, because
|
||||||
_gpgme_io_write always writes at least 1 byte before waking
|
_gpgme_io_write always writes at least 1 byte before waking
|
||||||
@ -846,7 +846,7 @@ writer (void *arg)
|
|||||||
wait_for_single_object (ctx->close_ev, INFINITE);
|
wait_for_single_object (ctx->close_ev, INFINITE);
|
||||||
|
|
||||||
if (ctx->nbytes)
|
if (ctx->nbytes)
|
||||||
TRACE_LOG ("still %d bytes in buffer at close time", ctx->nbytes);
|
TRACE_LOG ("still %zd bytes in buffer at close time", ctx->nbytes);
|
||||||
|
|
||||||
release_hddesc (ctx->hdd);
|
release_hddesc (ctx->hdd);
|
||||||
close_handle (ctx->close_ev);
|
close_handle (ctx->close_ev);
|
||||||
@ -1013,7 +1013,7 @@ _gpgme_io_write (int fd, const void *buffer, size_t count)
|
|||||||
{
|
{
|
||||||
struct writer_context_s *ctx;
|
struct writer_context_s *ctx;
|
||||||
TRACE_BEG (DEBUG_SYSIO, "_gpgme_io_write", fd,
|
TRACE_BEG (DEBUG_SYSIO, "_gpgme_io_write", fd,
|
||||||
"buffer=%p, count=%u", buffer, count);
|
"buffer=%p, count=%zd", buffer, count);
|
||||||
TRACE_LOGBUFX (buffer, count);
|
TRACE_LOGBUFX (buffer, count);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user