summaryrefslogtreecommitdiff
path: root/XMPFiles
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2017-01-11 11:42:12 -0500
committerHubert Figuière <hub@figuiere.net>2017-01-11 11:42:12 -0500
commit760e0afb3775914b84891b80c410196c45634b05 (patch)
treeaa5c60e9c268505b7b98a37a8832252546be3812 /XMPFiles
parent61aaac3d59284c90411705f9fbc1a7ae2da21c93 (diff)
Adobe SDK: fix format warnings in FormatSupport
Diffstat (limited to 'XMPFiles')
-rw-r--r--XMPFiles/source/FormatSupport/IFF/Chunk.cpp4
-rw-r--r--XMPFiles/source/FormatSupport/IFF/ChunkController.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp8
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp4
4 files changed, 11 insertions, 7 deletions
diff --git a/XMPFiles/source/FormatSupport/IFF/Chunk.cpp b/XMPFiles/source/FormatSupport/IFF/Chunk.cpp
index 8d3564d..04ad679 100644
--- a/XMPFiles/source/FormatSupport/IFF/Chunk.cpp
+++ b/XMPFiles/source/FormatSupport/IFF/Chunk.cpp
@@ -670,9 +670,9 @@ std::string Chunk::toString( std::string tabs, XMP_Bool showOriginal )
"type: %.4s, "
"offset: 0x%.8llX",
(char*)(&id),
- size,
+ (long long unsigned)size,
(char*)(&type),
- offset );
+ (long long unsigned)offset );
std::string str(buffer);
// Dump children
diff --git a/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp b/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp
index 29dec94..701970e 100644
--- a/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp
+++ b/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp
@@ -623,7 +623,7 @@ std::string ChunkController::dumpTree( )
if ( mTrailingGarbageSize != 0 )
{
- snprintf( buffer, 255, "\n Trailing Bytes: %llu", mTrailingGarbageSize );
+ snprintf( buffer, 255, "\n Trailing Bytes: %llu", (long long unsigned)mTrailingGarbageSize );
std::string str(buffer);
ret.append(str);
diff --git a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
index 66bd5a8..fd448c0 100644
--- a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
@@ -377,8 +377,12 @@ XMP_Bool WAVEReconcile::importToXMP( SXMPMeta& outXMP, const MetadataSet& inMeta
int count;
char nextCh;
const char * strValue = xmpValue.c_str();
- count = sscanf ( strValue, "%llu%c", &nSamples, &nextCh );
-
+
+ // make sure the format use the right type
+ long long unsigned numSamples;
+ count = sscanf ( strValue, "%llu%c", &numSamples, &nextCh );
+ nSamples = numSamples;
+
if ( count != 1 ) ok = false;
}
if ( ok )
diff --git a/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
index 58b434c..8e559a1 100644
--- a/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
@@ -284,7 +284,7 @@ namespace IFF_RIFF {
static XMP_Uns64 ConvertStringToUns64( const std::string & strValue ) {
int count;
char nextCh;
- XMP_Uns64 result;
+ long long unsigned result;
count = sscanf ( strValue.c_str(), "%llu%c", &result, &nextCh );
if ( count != 1 ) XMP_Throw ( "Invalid integer string", kXMPErr_BadParam );
@@ -422,7 +422,7 @@ namespace IFF_RIFF {
static std::string ConvertUns64ToString( XMP_Uns64 uValue ) {
char buffer[64];
- snprintf( buffer, sizeof( buffer ), "%llu", uValue );
+ snprintf( buffer, sizeof( buffer ), "%llu", (long long unsigned)uValue );
std::string str( buffer );
return str;
}