From 8d304c22ac85ac340c7edb82e1fef7faec9c9cd7 Mon Sep 17 00:00:00 2001 From: randomdan Date: Wed, 30 May 2012 23:59:34 +0000 Subject: Fix printf warnings on 64bit --- libodbcpp/error.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libodbcpp') diff --git a/libodbcpp/error.cpp b/libodbcpp/error.cpp index e971714..7707401 100644 --- a/libodbcpp/error.cpp +++ b/libodbcpp/error.cpp @@ -20,13 +20,13 @@ odbc_verror(RETCODE err, SQLSMALLINT handletype, SQLHANDLE handle, char const * case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO: if (msg) { - if (asprintf(msg, "%d: %ld: %5.5s: \"%s\" while attempting to %s", - err, sqlerr, sqlstatus, sqlerrmsg, action) < 1) { + if (asprintf(msg, "%d: %d: %5.5s: \"%s\" while attempting to %s", + err, (int)sqlerr, sqlstatus, sqlerrmsg, action) < 1) { *msg = NULL; } } - syslog(LOG_WARNING, "%s: %d: %ld: %5.5s: \"%s\" while attempting to %s", - __FUNCTION__, err, sqlerr, sqlstatus, sqlerrmsg, action); + syslog(LOG_WARNING, "%s: %d: %d: %5.5s: \"%s\" while attempting to %s", + __FUNCTION__, err, (int)sqlerr, sqlstatus, sqlerrmsg, action); break; case SQL_INVALID_HANDLE: -- cgit v1.2.3