summaryrefslogtreecommitdiff
path: root/XMPFiles
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2017-01-11 11:41:36 -0500
committerHubert Figuière <hub@figuiere.net>2017-01-11 11:41:36 -0500
commit61aaac3d59284c90411705f9fbc1a7ae2da21c93 (patch)
tree54725e5031e63ce9097820fe86bb5aaeb0e43ada /XMPFiles
parentdc4ba4154e9934f0446871dc44be1cb93fd6be68 (diff)
Adobe SDK: fix unused and uninitialized warnings in FormatSupport
Diffstat (limited to 'XMPFiles')
-rw-r--r--XMPFiles/source/FormatSupport/ASF_Support.cpp6
-rw-r--r--XMPFiles/source/FormatSupport/ID3_Support.cpp3
-rw-r--r--XMPFiles/source/FormatSupport/IFF/Chunk.cpp3
-rw-r--r--XMPFiles/source/FormatSupport/IPTC_Support.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/MOOV_Support.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/PNG_Support.cpp6
-rw-r--r--XMPFiles/source/FormatSupport/PSIR_FileWriter.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/RIFF_Support.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/ReconcileLegacy.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/ReconcileTIFF.cpp4
-rw-r--r--XMPFiles/source/FormatSupport/TIFF_FileWriter.cpp5
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp9
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp6
-rw-r--r--XMPFiles/source/FormatSupport/XDCAM_Support.cpp2
15 files changed, 32 insertions, 24 deletions
diff --git a/XMPFiles/source/FormatSupport/ASF_Support.cpp b/XMPFiles/source/FormatSupport/ASF_Support.cpp
index 709aea5..9202359 100644
--- a/XMPFiles/source/FormatSupport/ASF_Support.cpp
+++ b/XMPFiles/source/FormatSupport/ASF_Support.cpp
@@ -145,7 +145,7 @@ bool ASF_Support::ReadHeaderObject ( XMP_IO* fileRef, ObjectState& inOutObjectSt
pos += bufferSize;
// read contained header objects
- XMP_Uns32 numberOfHeaders = GetUns32LE ( &buffer[24] );
+ /*XMP_Uns32 numberOfHeaders = GetUns32LE ( &buffer[24] );*/
ASF_ObjectBase objectBase;
while ( read < newObject.len ) {
@@ -188,7 +188,7 @@ bool ASF_Support::ReadHeaderObject ( XMP_IO* fileRef, ObjectState& inOutObjectSt
XMP_Uns16 authorLen = GetUns16LE ( &buffer[26] );
XMP_Uns16 copyrightLen = GetUns16LE ( &buffer[28] );
XMP_Uns16 descriptionLen = GetUns16LE ( &buffer[30] );
- XMP_Uns16 ratingLen = GetUns16LE ( &buffer[32] );
+ /*XMP_Uns16 ratingLen = GetUns16LE ( &buffer[32] );*/
XMP_Uns16 fieldPos = 34;
@@ -314,7 +314,7 @@ bool ASF_Support::WriteHeaderObject ( XMP_IO* sourceRef, XMP_IO* destRef, const
pos += bufferSize;
// read contained header objects
- XMP_Uns32 numberOfHeaders = GetUns32LE ( &buffer[24] );
+ /*XMP_Uns32 numberOfHeaders = GetUns32LE ( &buffer[24] );*/
ASF_ObjectBase objectBase;
// prepare new header in memory
diff --git a/XMPFiles/source/FormatSupport/ID3_Support.cpp b/XMPFiles/source/FormatSupport/ID3_Support.cpp
index 528609c..790c299 100644
--- a/XMPFiles/source/FormatSupport/ID3_Support.cpp
+++ b/XMPFiles/source/FormatSupport/ID3_Support.cpp
@@ -416,7 +416,8 @@ bool ID3Header::read ( XMP_IO* file )
}
XMP_Uns8 major = this->fields[o_vMajor];
- XMP_Uns8 minor = this->fields[o_vMinor];
+ /*XMP_Uns8 minor = this->fields[o_vMinor];*/
+ // XXX I'm pretty sure it is minor <= 4. -- Hub
XMP_Validate ( ((2 <= major) && (major <= 4)), "Invalid ID3 major version", kXMPErr_BadFileFormat );
return true;
diff --git a/XMPFiles/source/FormatSupport/IFF/Chunk.cpp b/XMPFiles/source/FormatSupport/IFF/Chunk.cpp
index e8acc9f..8d3564d 100644
--- a/XMPFiles/source/FormatSupport/IFF/Chunk.cpp
+++ b/XMPFiles/source/FormatSupport/IFF/Chunk.cpp
@@ -843,7 +843,8 @@ void Chunk::writeChunk( XMP_IO* file )
XIO::WriteInt32_BE( file, mChunkId.id );
// writes size, which is always 32bit
- XMP_Uns32 outSize = ( mSize >= 0x00000000FFFFFFFF ? 0xFFFFFFFF : static_cast<XMP_Uns32>( mSize & 0x00000000FFFFFFFF ) );
+ // XXX for some reason this is unused -- Hub
+ /*XMP_Uns32 outSize = ( mSize >= 0x00000000FFFFFFFF ? 0xFFFFFFFF : static_cast<XMP_Uns32>( mSize & 0x00000000FFFFFFFF ) );*/
if (typeid(mEndian) == typeid(LittleEndian))
{
diff --git a/XMPFiles/source/FormatSupport/IPTC_Support.cpp b/XMPFiles/source/FormatSupport/IPTC_Support.cpp
index 3df7726..d18ff6a 100644
--- a/XMPFiles/source/FormatSupport/IPTC_Support.cpp
+++ b/XMPFiles/source/FormatSupport/IPTC_Support.cpp
@@ -222,7 +222,7 @@ void IPTC_Manager::ParseMemoryDataSets ( const void* data, XMP_Uns32 length, boo
// dsPtr - pointer to the current DataSet's header
// dsLen - value length, does not include extended size bytes
- XMP_Uns8* dsPtr = iptcPtr;
+ /*XMP_Uns8* dsPtr = iptcPtr;*/
XMP_Uns8 oneC = *iptcPtr;
XMP_Uns8 recNum = *(iptcPtr+1);
XMP_Uns8 dsNum = *(iptcPtr+2);
diff --git a/XMPFiles/source/FormatSupport/MOOV_Support.cpp b/XMPFiles/source/FormatSupport/MOOV_Support.cpp
index 50b02eb..06e28c7 100644
--- a/XMPFiles/source/FormatSupport/MOOV_Support.cpp
+++ b/XMPFiles/source/FormatSupport/MOOV_Support.cpp
@@ -267,7 +267,7 @@ void MOOV_Manager::ParseNestedBoxes ( BoxNode * parentNode, const std::string &
#endif
const char * pathSuffix = 0; // Set to non-zero for boxes of interest.
- char buffer[6]; buffer[0] = 0;
+ /*char buffer[6]; buffer[0] = 0;*/
switch ( isoInfo.boxType ) { // Want these boxes regardless of parent.
case ISOMedia::k_udta : pathSuffix = "/udta"; break;
diff --git a/XMPFiles/source/FormatSupport/PNG_Support.cpp b/XMPFiles/source/FormatSupport/PNG_Support.cpp
index c58fc87..a058de3 100644
--- a/XMPFiles/source/FormatSupport/PNG_Support.cpp
+++ b/XMPFiles/source/FormatSupport/PNG_Support.cpp
@@ -73,11 +73,13 @@ namespace CRC
return c;
}
+#if 0 // unused
/* Return the CRC of the bytes buf[0..len-1]. */
static unsigned long crc(unsigned char *buf, int len)
{
return update_crc(0xffffffffL, buf, len) ^ 0xffffffffL;
}
+#endif
} // namespace CRC
namespace PNG_Support
@@ -149,7 +151,7 @@ namespace PNG_Support
bytesRead = fileRef->Read ( buffer, 4 );
if ( bytesRead != 4 ) return false;
inOutPosition += 4;
- long crc = GetUns32BE(buffer);
+ /*long crc =*/ GetUns32BE(buffer);
ChunkData newChunk;
@@ -243,7 +245,7 @@ namespace PNG_Support
fileRef->Seek ( (inOutChunkData.pos + 4), kXMP_SeekFromStart );
size_t pos = 0;
- long bytesRead = fileRef->Read ( &buffer[pos], (inOutChunkData.len + 4) );
+ /*long bytesRead =*/ fileRef->Read ( &buffer[pos], (inOutChunkData.len + 4) );
unsigned long crc = CalculateCRC( buffer, (inOutChunkData.len + 4) );
unsigned long crc_value = MakeUns32BE( crc );
diff --git a/XMPFiles/source/FormatSupport/PSIR_FileWriter.cpp b/XMPFiles/source/FormatSupport/PSIR_FileWriter.cpp
index 12adc58..202de06 100644
--- a/XMPFiles/source/FormatSupport/PSIR_FileWriter.cpp
+++ b/XMPFiles/source/FormatSupport/PSIR_FileWriter.cpp
@@ -487,7 +487,7 @@ XMP_Uns32 PSIR_FileWriter::UpdateFileResources ( XMP_IO* sourceRef, XMP_IO* dest
XMP_ProgressTracker* progressTracker )
{
const XMP_Uns32 zero32 = 0;
- const bool checkAbort = (abortProc != 0);
+ /*const bool checkAbort = (abortProc != 0);*/
struct RsrcHeader {
XMP_Uns32 type;
diff --git a/XMPFiles/source/FormatSupport/RIFF_Support.cpp b/XMPFiles/source/FormatSupport/RIFF_Support.cpp
index a64c98e..e2549e8 100644
--- a/XMPFiles/source/FormatSupport/RIFF_Support.cpp
+++ b/XMPFiles/source/FormatSupport/RIFF_Support.cpp
@@ -643,7 +643,7 @@ void importProperties( RIFF_MetaHandler* handler )
void relocateWronglyPlacedXMPChunk( RIFF_MetaHandler* handler )
{
- XMP_IO* file = handler->parent->ioRef;
+ /*XMP_IO* file = handler->parent->ioRef;*/
RIFF::containerVect *rc = &handler->riffChunks;
RIFF::ContainerChunk* lastChunk = rc->at( rc->size()-1 );
diff --git a/XMPFiles/source/FormatSupport/ReconcileLegacy.cpp b/XMPFiles/source/FormatSupport/ReconcileLegacy.cpp
index e71af09..4e8809d 100644
--- a/XMPFiles/source/FormatSupport/ReconcileLegacy.cpp
+++ b/XMPFiles/source/FormatSupport/ReconcileLegacy.cpp
@@ -41,7 +41,7 @@ void ImportPhotoData ( const TIFF_Manager & exif,
SXMPMeta * xmp,
XMP_OptionBits options /* = 0 */ )
{
- bool haveXMP = XMP_OptionIsSet ( options, k2XMP_FileHadXMP );
+ /*bool haveXMP = XMP_OptionIsSet ( options, k2XMP_FileHadXMP );*/
bool haveExif = XMP_OptionIsSet ( options, k2XMP_FileHadExif );
bool haveIPTC = XMP_OptionIsSet ( options, k2XMP_FileHadIPTC );
diff --git a/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp b/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp
index ee58379..9757200 100644
--- a/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp
+++ b/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp
@@ -1345,7 +1345,7 @@ ImportTIFF_Date ( const TIFF_Manager & tiff, const TIFF_Manager::TagInfo & dateI
// =================================================================================================
// ImportTIFF_LocTextASCII
// =======================
-
+#if 0 // unused
static void
ImportTIFF_LocTextASCII ( const TIFF_Manager & tiff, XMP_Uns8 ifd, XMP_Uns16 tagID,
SXMPMeta * xmp, const char * xmpNS, const char * xmpProp )
@@ -1383,7 +1383,7 @@ ImportTIFF_LocTextASCII ( const TIFF_Manager & tiff, XMP_Uns8 ifd, XMP_Uns16 tag
}
} // ImportTIFF_LocTextASCII
-
+#endif
// =================================================================================================
// ImportTIFF_EncodedString
// ========================
diff --git a/XMPFiles/source/FormatSupport/TIFF_FileWriter.cpp b/XMPFiles/source/FormatSupport/TIFF_FileWriter.cpp
index ec92c8e..a646393 100644
--- a/XMPFiles/source/FormatSupport/TIFF_FileWriter.cpp
+++ b/XMPFiles/source/FormatSupport/TIFF_FileWriter.cpp
@@ -1930,7 +1930,10 @@ void TIFF_FileWriter::UpdateFileStream ( XMP_IO* fileRef, XMP_ProgressTracker* p
// Append the IFDs and tag values that grow.
- XMP_Int64 fileEnd = fileRef->Seek ( 0, kXMP_SeekFromEnd );
+#if XMP_DebugBuild
+ XMP_Int64 fileEnd =
+#endif
+ fileRef->Seek ( 0, kXMP_SeekFromEnd );
XMP_Assert ( fileEnd == appendedOrigin );
for ( int ifd = 0; ifd < kTIFF_KnownIFDCount; ++ifd ) {
diff --git a/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp
index 73165e4..1c7eeee 100644
--- a/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp
@@ -301,7 +301,7 @@ bool CartMetadata::isEmptyValue ( XMP_Uns32 id, ValueObject& valueObj ) {
if( obj != NULL )
{
XMP_Uns32 size = 0;
- const StoredCartTimer* const buffer = obj->getArray( size );
+ /*const StoredCartTimer* const buffer =*/ obj->getArray( size );
isEmpty = ( size == 0 );
}
diff --git a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
index db15dab..66bd5a8 100644
--- a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
@@ -73,7 +73,7 @@ static const char * kDM_timeValue = "timeValue";
static const char * kDM_good = "good";
static const char * kIXML_trackList = "trackList";
static const char * kIXML_channelIndex = "channelIndex";
-static const char * kIXML_interleaveIndex = "interleaveIndex";
+/*static const char * kIXML_interleaveIndex = "interleaveIndex";*/
static const char * kIXML_Name = "name";
static const char * kIXML_Function = "function";
@@ -917,9 +917,6 @@ void IFF_RIFF::WAVEReconcile::exportSpecialXMPToiXML( SXMPMeta & inXMP, IMetadat
bool bextTimeReferenceDataAvailable = false;
XMP_Uns32 bextLowValue = 0;
XMP_Uns32 bextHighValue = 0;
- bool timeCodeDataAvailable = false;
- XMP_Uns32 tcLowValue = 0;
- XMP_Uns32 tcHighValue = 0;
try
{
@@ -937,6 +934,10 @@ void IFF_RIFF::WAVEReconcile::exportSpecialXMPToiXML( SXMPMeta & inXMP, IMetadat
}
#if 0 // reverse calculation from timecode to samples can result in different number of samples. So ignoring for time being
+ bool timeCodeDataAvailable = false;
+ XMP_Uns32 tcLowValue = 0;
+ XMP_Uns32 tcHighValue = 0;
+
if ( outNativeMeta.valueExists( iXMLMetadata::kTimeStampSampleRate ) )
{
try
diff --git a/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
index a153bc7..58b434c 100644
--- a/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
@@ -127,9 +127,9 @@ namespace IFF_RIFF {
return;
}
- XMP_StringPtr ns = mRootNode->ns.c_str();
+ /*XMP_StringPtr ns = mRootNode->ns.c_str();*/
- XML_NodePtr currentNode( NULL );
+ /*XML_NodePtr currentNode( NULL );*/
ParseAndSetProperties();
resetChanges();
@@ -871,7 +871,7 @@ namespace IFF_RIFF {
std::string strValue = ParseStringValue( parentNode, tagName, false );
if ( strValue.size() > 0 ) {
- XMP_Uns64 uValue;
+ XMP_Uns64 uValue = 0;
try {
uValue = ConvertStringToUns64( Trim( strValue ) );
} catch( ... ) {
diff --git a/XMPFiles/source/FormatSupport/XDCAM_Support.cpp b/XMPFiles/source/FormatSupport/XDCAM_Support.cpp
index cb65bf0..b9ce94a 100644
--- a/XMPFiles/source/FormatSupport/XDCAM_Support.cpp
+++ b/XMPFiles/source/FormatSupport/XDCAM_Support.cpp
@@ -111,7 +111,7 @@ bool XDCAM_Support::GetMediaProLegacyMetadata ( SXMPMeta * xmpObjPtr,
{ if ( expat != 0 ) delete expat; return containsXMP; }
XML_NodePtr mediaproRootElem = 0;
- XML_NodePtr contentContext = 0, materialContext = 0;
+ XML_NodePtr contentContext = 0 /*, materialContext = 0*/;
XMP_Uns8 buffer [64*1024];
while ( true ) {