From 24c10efab6eb1e160653a15d580913706a01499b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 10 Oct 2006 13:31:49 +0000 Subject: [PATCH] Cast a few offsets to long for yaz_log calls --- src/yaz-my-client.cpp | 4 ++-- src/yaz-z-assoc.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/yaz-my-client.cpp b/src/yaz-my-client.cpp index 6ea5fa3..3336587 100644 --- a/src/yaz-my-client.cpp +++ b/src/yaz-my-client.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-my-client.cpp,v 1.23 2006-03-29 13:14:16 adam Exp $ + * $Id: yaz-my-client.cpp,v 1.24 2006-10-10 13:31:49 adam Exp $ */ #include @@ -311,7 +311,7 @@ void MyClient::recv_record(Z_DatabaseRecord *record, int offset, if (!(*etype->fun)(odr_decode(), (char **)&rr, 0, 0)) { odr_perror(odr_decode(), "Decoding constructed record."); - fprintf(stderr, "[Near %d]\n", odr_offset(odr_decode())); + fprintf(stderr, "[Near %ld]\n", (long) odr_offset(odr_decode())); fprintf(stderr, "Packet dump:\n---------\n"); odr_dumpBER(stderr, (char*)record->u.octet_aligned->buf, record->u.octet_aligned->len); diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index bf82970..baab950 100644 --- a/src/yaz-z-assoc.cpp +++ b/src/yaz-z-assoc.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-assoc.cpp,v 1.39 2006-03-29 13:14:18 adam Exp $ + * $Id: yaz-z-assoc.cpp,v 1.40 2006-10-10 13:31:49 adam Exp $ */ #include @@ -213,9 +213,9 @@ Z_GDU *Z_Assoc::decode_GDU(const char *buf, int len) if (!z_GDU(m_odr_in, &apdu, 0, 0)) { const char *element = odr_getelement(m_odr_in); - yaz_log(YLOG_LOG, "PDU decode failed '%s' near byte %d. Element %s", + yaz_log(YLOG_LOG, "PDU decode failed '%s' near byte %ld. Element %s", odr_errmsg(odr_geterror(m_odr_in)), - odr_offset(m_odr_in), + (long) odr_offset(m_odr_in), element ? element : "unknown"); yaz_log(YLOG_LOG, "PDU dump:"); odr_dumpBER(yaz_log_file(), buf, len); -- 1.7.10.4