From 3c9c0eda35f7e968aec17c54905eb84cabaf762d Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Sun, 15 Nov 2009 13:55:19 +0000 Subject: [PATCH] #653: Merged c1920 from branches/unstable. --- xmpsdk/src/XML_Node.cpp | 1 + xmpsdk/src/XMPUtils.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xmpsdk/src/XML_Node.cpp b/xmpsdk/src/XML_Node.cpp index 7cab0add..8f76d0f0 100644 --- a/xmpsdk/src/XML_Node.cpp +++ b/xmpsdk/src/XML_Node.cpp @@ -11,6 +11,7 @@ #include #include +#include // ! Can't include XMP..._Impl.hpp - used by both Core and Files. #define XMP_LitNMatch(s,l,n) (std::strncmp((s),(l),(n)) == 0) diff --git a/xmpsdk/src/XMPUtils.cpp b/xmpsdk/src/XMPUtils.cpp index e6a8bd8b..5aa13daf 100644 --- a/xmpsdk/src/XMPUtils.cpp +++ b/xmpsdk/src/XMPUtils.cpp @@ -1172,9 +1172,9 @@ XMPUtils::ConvertToInt ( XMP_StringPtr strValue ) XMP_Int32 result; if ( ! XMP_LitNMatch ( strValue, "0x", 2 ) ) { - count = sscanf ( strValue, "%d%c", &result, &nextCh ); + count = sscanf ( strValue, "%d%c", (int*)&result, &nextCh ); } else { - count = sscanf ( strValue, "%x%c", &result, &nextCh ); + count = sscanf ( strValue, "%x%c", (unsigned int*)&result, &nextCh ); } if ( count != 1 ) XMP_Throw ( "Invalid integer string", kXMPErr_BadParam );