diff options
-rw-r--r-- | XMPCore/source/XMPMeta-GetSet.cpp | 3 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/P2_Handler.cpp | 24 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/PSD_Handler.cpp | 3 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/PostScript_Handler.cpp | 54 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/RIFF_Handler.cpp | 2 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/SVG_Handler.cpp | 2 | ||||
-rw-r--r-- | XMPFiles/source/FileHandlers/Scanner_Handler.cpp | 8 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/P2_Support.cpp | 2 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/PNG_Support.cpp | 2 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/PostScript_Support.cpp | 1 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/Reconcile_Impl.cpp | 4 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/XMPScanner.cpp | 6 | ||||
-rw-r--r-- | XMPFiles/source/PluginHandler/FileHandlerInstance.cpp | 6 | ||||
-rw-r--r-- | source/Host_IO-POSIX.cpp | 2 | ||||
-rw-r--r-- | source/XMP_LibUtils.cpp | 4 | ||||
-rw-r--r-- | source/XMP_LibUtils.hpp | 2 |
16 files changed, 65 insertions, 60 deletions
diff --git a/XMPCore/source/XMPMeta-GetSet.cpp b/XMPCore/source/XMPMeta-GetSet.cpp index 010d254..8ae3b80 100644 --- a/XMPCore/source/XMPMeta-GetSet.cpp +++ b/XMPCore/source/XMPMeta-GetSet.cpp @@ -69,7 +69,7 @@ typedef unsigned char XMP_CLTMatch; #if XMP_MARKER_EXTENSIBILITY_BACKWARD_COMPATIBILITY extern "C" { - +#if 0 // UNUSED -- Hub static void ReleaseXMP_Node(void * node) { if (node) { XMP_Node * ptr = (XMP_Node *)node; @@ -77,6 +77,7 @@ extern "C" { ptr = NULL; } } +#endif } #if ENABLE_CPP_DOM_MODEL diff --git a/XMPFiles/source/FileHandlers/P2_Handler.cpp b/XMPFiles/source/FileHandlers/P2_Handler.cpp index 493ecb6..8cbd442 100644 --- a/XMPFiles/source/FileHandlers/P2_Handler.cpp +++ b/XMPFiles/source/FileHandlers/P2_Handler.cpp @@ -920,28 +920,28 @@ void P2_MetaHandler::SetAltitudeFromLegacyXML ( XML_NodePtr legacyLocationConte // P2_MetaHandler::ForceChildElement // ================================= -XML_Node * P2_MetaHandler::ForceChildElement ( XML_Node * parent, XMP_StringPtr localName, XMP_Int32 indent , XMP_Bool insertAtFront ) +XML_Node * P2_MetaHandler::ForceChildElement ( XML_Node * parent_, XMP_StringPtr localName, XMP_Int32 indent , XMP_Bool insertAtFront ) { XML_Node * wsNodeBefore, * wsNodeAfter; wsNodeBefore = wsNodeAfter = NULL; P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ; XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str(); - XML_Node * childNode = parent->GetNamedElement ( p2NS, localName ); + XML_Node * childNode = parent_->GetNamedElement ( p2NS, localName ); // if ( childNode == 0 ) { // The indenting is a hack, assuming existing 2 spaces per level. try { - wsNodeBefore = new XML_Node ( parent, "", kCDataNode ); + wsNodeBefore = new XML_Node ( parent_, "", kCDataNode ); wsNodeBefore->value = " "; // Add 2 spaces to the existing WS before the parent's close tag. - childNode = new XML_Node ( parent, localName, kElemNode ); - childNode->ns = parent->ns; - childNode->nsPrefixLen = parent->nsPrefixLen; - childNode->name.insert ( 0, parent->name, 0, parent->nsPrefixLen ); + childNode = new XML_Node ( parent_, localName, kElemNode ); + childNode->ns = parent_->ns; + childNode->nsPrefixLen = parent_->nsPrefixLen; + childNode->name.insert ( 0, parent_->name, 0, parent_->nsPrefixLen ); - wsNodeAfter = new XML_Node ( parent, "", kCDataNode ); + wsNodeAfter = new XML_Node ( parent_, "", kCDataNode ); } catch (...) { if (wsNodeBefore) delete wsNodeBefore; @@ -965,12 +965,12 @@ XML_Node * P2_MetaHandler::ForceChildElement ( XML_Node * parent, XMP_StringPtr indentedNode.push_back(wsNodeAfter); indentedNode.push_back(wsNodeBefore); indentedNode.push_back(childNode); - parent->content.insert(parent->content.begin(), indentedNode.begin(), indentedNode.end()); + parent_->content.insert(parent_->content.begin(), indentedNode.begin(), indentedNode.end()); } else{ - parent->content.push_back(wsNodeBefore); - parent->content.push_back(childNode); - parent->content.push_back(wsNodeAfter); + parent_->content.push_back(wsNodeBefore); + parent_->content.push_back(childNode); + parent_->content.push_back(wsNodeAfter); } } diff --git a/XMPFiles/source/FileHandlers/PSD_Handler.cpp b/XMPFiles/source/FileHandlers/PSD_Handler.cpp index e60aa6b..72a511f 100644 --- a/XMPFiles/source/FileHandlers/PSD_Handler.cpp +++ b/XMPFiles/source/FileHandlers/PSD_Handler.cpp @@ -270,6 +270,7 @@ void PSD_MetaHandler::ProcessXMP() void PSD_MetaHandler::UpdateFile ( bool doSafeUpdate ) { + (void)doSafeUpdate; // UNUSED beside assert -- Hub XMP_Assert ( ! doSafeUpdate ); // This should only be called for "unsafe" updates. XMP_Int64 oldPacketOffset = this->packetInfo.offset; @@ -433,4 +434,4 @@ void PSD_MetaHandler::WriteTempFile ( XMP_IO* tempRef ) } // PSD_MetaHandler::WriteTempFile -// =================================================================================================
\ No newline at end of file +// ================================================================================================= diff --git a/XMPFiles/source/FileHandlers/PostScript_Handler.cpp b/XMPFiles/source/FileHandlers/PostScript_Handler.cpp index 65fafc9..82ffe1c 100644 --- a/XMPFiles/source/FileHandlers/PostScript_Handler.cpp +++ b/XMPFiles/source/FileHandlers/PostScript_Handler.cpp @@ -232,7 +232,7 @@ bool PostScript_MetaHandler::FindFirstPacket() XMP_IO* fileRef = this->parent->ioRef; XMP_Int64 fileLen = fileRef->Length(); - XMP_PacketInfo & packetInfo = this->packetInfo; + XMP_PacketInfo & packetInfo_ = this->packetInfo; XMPScanner scanner ( fileLen ); XMPScanner::SnipInfoVector snips; @@ -272,12 +272,12 @@ bool PostScript_MetaHandler::FindFirstPacket() if (!firstfound) { if ( snips[i].fLength > 0x7FFFFFFF ) XMP_Throw ( "PostScript_MetaHandler::FindFirstPacket: Oversize packet", kXMPErr_BadXMP ); - packetInfo.offset = snips[i].fOffset; - packetInfo.length = (XMP_Int32)snips[i].fLength; - packetInfo.charForm = snips[i].fCharForm; - packetInfo.writeable = (snips[i].fAccess == 'w'); - firstPacketInfo=packetInfo; - lastPacketInfo=packetInfo; + packetInfo_.offset = snips[i].fOffset; + packetInfo_.length = (XMP_Int32)snips[i].fLength; + packetInfo_.charForm = snips[i].fCharForm; + packetInfo_.writeable = (snips[i].fAccess == 'w'); + firstPacketInfo=packetInfo_; + lastPacketInfo=packetInfo_; firstfound=true; } else @@ -311,7 +311,7 @@ bool PostScript_MetaHandler::FindLastPacket() XMP_IO* fileRef = this->parent->ioRef; XMP_Int64 fileLen = fileRef->Length(); - XMP_PacketInfo & packetInfo = this->packetInfo; + XMP_PacketInfo & packetInfo_ = this->packetInfo; // ------------------------------------------------------ // Scan the entire file to find all of the valid packets. @@ -354,12 +354,12 @@ bool PostScript_MetaHandler::FindLastPacket() if (!lastfound) { if ( snips[i].fLength > 0x7FFFFFFF ) XMP_Throw ( "PostScript_MetaHandler::FindLastPacket: Oversize packet", kXMPErr_BadXMP ); - packetInfo.offset = snips[i].fOffset; - packetInfo.length = (XMP_Int32)snips[i].fLength; - packetInfo.charForm = snips[i].fCharForm; - packetInfo.writeable = (snips[i].fAccess == 'w'); - firstPacketInfo=packetInfo; - lastPacketInfo=packetInfo; + packetInfo_.offset = snips[i].fOffset; + packetInfo_.length = (XMP_Int32)snips[i].fLength; + packetInfo_.charForm = snips[i].fCharForm; + packetInfo_.writeable = (snips[i].fAccess == 'w'); + firstPacketInfo=packetInfo_; + lastPacketInfo=packetInfo_; lastfound=true; } else @@ -368,7 +368,7 @@ bool PostScript_MetaHandler::FindLastPacket() lastPacketInfo.length = (XMP_Int32)snips[i].fLength; lastPacketInfo.charForm = snips[i].fCharForm; lastPacketInfo.writeable = (snips[i].fAccess == 'w'); - packetInfo=lastPacketInfo; + packetInfo_=lastPacketInfo; } } } @@ -962,15 +962,15 @@ void PostScript_MetaHandler::ParsePSFile() // ===================================== // // Helper method read the raw xmp into a string from a file -void PostScript_MetaHandler::ReadXMPPacket (std::string & xmpPacket ) +void PostScript_MetaHandler::ReadXMPPacket (std::string & xmpPacket_ ) { if ( packetInfo.length == 0 ) XMP_Throw ( "ReadXMPPacket - No XMP packet", kXMPErr_BadXMP ); - xmpPacket.erase(); - xmpPacket.reserve ( packetInfo.length ); - xmpPacket.append ( packetInfo.length, ' ' ); + xmpPacket_.erase(); + xmpPacket_.reserve ( packetInfo.length ); + xmpPacket_.append ( packetInfo.length, ' ' ); - XMP_StringPtr packetStr = XMP_StringPtr ( xmpPacket.c_str() ); // Don't set until after reserving the space! + XMP_StringPtr packetStr = XMP_StringPtr ( xmpPacket_.c_str() ); // Don't set until after reserving the space! this->parent->ioRef->Seek ( packetInfo.offset, kXMP_SeekFromStart ); this->parent->ioRef->ReadAll ( (char*)packetStr, packetInfo.length ); @@ -1306,16 +1306,16 @@ void PostScript_MetaHandler::modifyHeader(XMP_IO* fileRef,XMP_Int64 extrabytes,X UpdateMethod PostScript_MetaHandler::DetermineUpdateMethod(std::string & outStr) { SXMPMeta xmp; - std::string & xmpPacket = this->xmpPacket; - XMP_PacketInfo & packetInfo = this->packetInfo; - xmp.ParseFromBuffer( xmpPacket.c_str(), (XMP_Uns32)xmpPacket.length() ); - if (packetInfo.length>0) + std::string & xmpPacket_ = this->xmpPacket; + XMP_PacketInfo & packetInfo_ = this->packetInfo; + xmp.ParseFromBuffer( xmpPacket_.c_str(), (XMP_Uns32)xmpPacket_.length() ); + if (packetInfo_.length>0) { try { //First try to fit the modified XMP data into existing XMP packet length //prefers Inplace - xmp.SerializeToBuffer( &outStr, kXMP_ExactPacketLength|kXMP_UseCompactFormat,packetInfo.length); + xmp.SerializeToBuffer( &outStr, kXMP_ExactPacketLength|kXMP_UseCompactFormat,packetInfo_.length); } catch(...) { @@ -1328,11 +1328,11 @@ UpdateMethod PostScript_MetaHandler::DetermineUpdateMethod(std::string & outStr) // this will be the case for Injecting new metadata xmp.SerializeToBuffer( &outStr, kXMP_UseCompactFormat,0); } - if ( this->containsXMPHint && (outStr.size() == (size_t)packetInfo.length) ) + if ( this->containsXMPHint && (outStr.size() == (size_t)packetInfo_.length) ) { return kPS_Inplace; } - else if (this->containsXMPHint && PostScript_Support::IsSFDFilterUsed(this->parent->ioRef,packetInfo.offset)) + else if (this->containsXMPHint && PostScript_Support::IsSFDFilterUsed(this->parent->ioRef,packetInfo_.offset)) { return kPS_ExpandSFDFilter; } diff --git a/XMPFiles/source/FileHandlers/RIFF_Handler.cpp b/XMPFiles/source/FileHandlers/RIFF_Handler.cpp index 1bed294..9c83424 100644 --- a/XMPFiles/source/FileHandlers/RIFF_Handler.cpp +++ b/XMPFiles/source/FileHandlers/RIFF_Handler.cpp @@ -181,7 +181,7 @@ void RIFF_MetaHandler::ProcessXMP() // RIFF_MetaHandler::UpdateFile // =========================== -void RIFF_MetaHandler::UpdateFile ( bool doSafeUpdate ) +void RIFF_MetaHandler::UpdateFile ( bool /*doSafeUpdate*/ ) { XMP_Validate( this->needsUpdate, "nothing to update", kXMPErr_InternalFailure ); diff --git a/XMPFiles/source/FileHandlers/SVG_Handler.cpp b/XMPFiles/source/FileHandlers/SVG_Handler.cpp index 3ab2e71..9ab82cf 100644 --- a/XMPFiles/source/FileHandlers/SVG_Handler.cpp +++ b/XMPFiles/source/FileHandlers/SVG_Handler.cpp @@ -448,7 +448,7 @@ XMPFileHandler * SVG_MetaHandlerCTor( XMPFiles * parent ) // SVG_MetaHandler::SVG_MetaHandler // ================================ -SVG_MetaHandler::SVG_MetaHandler(XMPFiles * _parent) : svgNode(0), svgAdapter(0), isTitleUpdateReq(false), isDescUpdateReq(false), isCompressed(false), compressedHeader() +SVG_MetaHandler::SVG_MetaHandler(XMPFiles * _parent) : svgAdapter(0), svgNode(0), isTitleUpdateReq(false), isDescUpdateReq(false), isCompressed(false), compressedHeader() { this->parent = _parent; this->handlerFlags = kSVG_HandlerFlags; diff --git a/XMPFiles/source/FileHandlers/Scanner_Handler.cpp b/XMPFiles/source/FileHandlers/Scanner_Handler.cpp index a3b68cc..6f9b46b 100644 --- a/XMPFiles/source/FileHandlers/Scanner_Handler.cpp +++ b/XMPFiles/source/FileHandlers/Scanner_Handler.cpp @@ -282,15 +282,15 @@ void Scanner_MetaHandler::CacheFileData() if ( snips[pkt].fState != XMPScanner::eValidPacketSnip ) continue; fileRef->Seek ( snips[pkt].fOffset, kXMP_SeekFromStart ); newMeta = new SXMPMeta(); - std::string xmpPacket; - xmpPacket.reserve ( (size_t)snips[pkt].fLength ); + std::string xmpPacket_; + xmpPacket_.reserve ( (size_t)snips[pkt].fLength ); try { for ( bufPos = 0; bufPos < snips[pkt].fLength; bufPos += bufLen ) { bufLen = kBufferSize; if ( (bufPos + bufLen) > (size_t)snips[pkt].fLength ) bufLen = size_t ( snips[pkt].fLength - bufPos ); (void) fileRef->ReadAll ( buffer, (XMP_Int32)bufLen ); - xmpPacket.append ( (const char *)buffer, bufLen ); + xmpPacket_.append ( (const char *)buffer, bufLen ); newMeta->ParseFromBuffer ( (char *)buffer, (XMP_StringLen)bufLen, kXMP_ParseMoreBuffers ); } newMeta->ParseFromBuffer ( 0, 0, kXMP_NoOptions ); @@ -305,7 +305,7 @@ void Scanner_MetaHandler::CacheFileData() candidates.push_back ( CandidateInfo() ); CandidateInfo & newInfo = candidates.back(); newInfo.xmpObj = newMeta; - newInfo.xmpPacket.swap ( xmpPacket ); + newInfo.xmpPacket.swap ( xmpPacket_ ); newInfo.packetInfo.offset = snips[pkt].fOffset; newInfo.packetInfo.length = (XMP_Int32)snips[pkt].fLength; newInfo.packetInfo.charForm = snips[pkt].fCharForm; diff --git a/XMPFiles/source/FormatSupport/P2_Support.cpp b/XMPFiles/source/FormatSupport/P2_Support.cpp index 15962d0..f97ffcd 100644 --- a/XMPFiles/source/FormatSupport/P2_Support.cpp +++ b/XMPFiles/source/FormatSupport/P2_Support.cpp @@ -26,7 +26,7 @@ #include "third-party/zuid/interfaces/MD5.h" P2_Clip::P2_Clip(const std::string & p2ClipMetadataFilePath) - :p2XMLParser(0), p2Root(0), headContentCached(false) + :headContentCached(false), p2XMLParser(0), p2Root(0) , p2ClipContent(0), filePath(p2ClipMetadataFilePath) { PrepareForExpatParser(p2ClipMetadataFilePath); diff --git a/XMPFiles/source/FormatSupport/PNG_Support.cpp b/XMPFiles/source/FormatSupport/PNG_Support.cpp index 79e9f49..9ec0ced 100644 --- a/XMPFiles/source/FormatSupport/PNG_Support.cpp +++ b/XMPFiles/source/FormatSupport/PNG_Support.cpp @@ -74,10 +74,12 @@ namespace CRC } /* Return the CRC of the bytes buf[0..len-1]. */ +#if 0 static unsigned long crc(unsigned char *buf, int len) { return update_crc(0xffffffffL, buf, len) ^ 0xffffffffL; } +#endif } // namespace CRC namespace PNG_Support diff --git a/XMPFiles/source/FormatSupport/PostScript_Support.cpp b/XMPFiles/source/FormatSupport/PostScript_Support.cpp index dcb6ecf..1c31187 100644 --- a/XMPFiles/source/FormatSupport/PostScript_Support.cpp +++ b/XMPFiles/source/FormatSupport/PostScript_Support.cpp @@ -267,6 +267,7 @@ bool PostScript_Support::IsValidPSFile(XMP_IO* fileRef,XMP_FileFormat &format if ( ! CheckBytes ( ioBuf.ptr, Uns8Ptr("EPSF-"), 5 ) ) return true; }//intentional fall through for further checking of unknown files + // fallthrough case kXMP_EPSFile: { diff --git a/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp b/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp index 734d65d..0163fe9 100644 --- a/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp +++ b/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp @@ -375,8 +375,8 @@ void ReconcileUtils::UTF8ToLatin1 ( const void * _utf8Ptr, size_t utf8Len, std:: void ReconcileUtils::LocalToUTF8 ( const void * _localPtr, size_t localLen, std::string * utf8 ) { const XMP_Uns8* localPtr = (XMP_Uns8*)_localPtr; - const char* localPtr1 = (const char*)_localPtr; - const wchar_t * lptr=(const wchar_t *)_localPtr; +// UNUSED -- Hub const char* localPtr1 = (const char*)_localPtr; +// UNUSED -- Hub const wchar_t * lptr=(const wchar_t *)_localPtr; utf8->erase(); diff --git a/XMPFiles/source/FormatSupport/XMPScanner.cpp b/XMPFiles/source/FormatSupport/XMPScanner.cpp index abf2123..4591963 100644 --- a/XMPFiles/source/FormatSupport/XMPScanner.cpp +++ b/XMPFiles/source/FormatSupport/XMPScanner.cpp @@ -373,14 +373,14 @@ XMPScanner::PacketMachine::CaptureAttrValue ( PacketMachine * ths, const char * ths->fBufferPtr += bytesPerChar; ths->fPosition = 1; // fall through OK because MatchOpenQuote will check the buffer limit and nulls ... - + // fallthrough case 1 : // Look for the open quote. result = MatchOpenQuote ( ths, NULL ); if ( result != eTriYes ) return result; ths->fPosition = 2; // fall through OK because the buffer limit and nulls are checked below ... - + // fallthrough default : // Look for the close quote, capturing the value along the way. assert ( ths->fPosition == 2 ); @@ -433,7 +433,7 @@ XMPScanner::PacketMachine::RecordStart ( PacketMachine * ths, const char * /* un ths->fPacketLength = 0; ths->fPosition = 1; // ! OK to fall through here, we didn't consume a byte in this step. - + // fallthrough case 1 : // Look for the first null byte. if ( currByte != 0 ) return eTriYes; // No nulls found. ths->fCharForm = eChar16BitBig; // Assume 16 bit big endian for now. diff --git a/XMPFiles/source/PluginHandler/FileHandlerInstance.cpp b/XMPFiles/source/PluginHandler/FileHandlerInstance.cpp index f998ceb..1fad53f 100644 --- a/XMPFiles/source/PluginHandler/FileHandlerInstance.cpp +++ b/XMPFiles/source/PluginHandler/FileHandlerInstance.cpp @@ -80,8 +80,8 @@ void FileHandlerInstance::ProcessXMP() { XMP_StringPtr xmpStr = this->xmpPacket.c_str(); XMP_StringPtr oldPacketPtr = NULL; - XMP_PacketInfo packetInfo; - mHandler->getModule()->getPluginAPIs()->mImportToXMPStringWithPacketProc( this->mObject, &xmpStr, &error, &oldPacketPtr, &packetInfo ); + XMP_PacketInfo packetInfo_; + mHandler->getModule()->getPluginAPIs()->mImportToXMPStringWithPacketProc( this->mObject, &xmpStr, &error, &oldPacketPtr, &packetInfo_ ); if( xmpStr != NULL && xmpStr != this->xmpPacket.c_str() ) { @@ -98,7 +98,7 @@ void FileHandlerInstance::ProcessXMP() { this->xmpPacket.resize( strlen( oldPacketPtr ) ); this->xmpPacket.assign( oldPacketPtr ); - this->packetInfo = packetInfo; + this->packetInfo = packetInfo_; // Note: Freeing memory would not create any problem as plugin would have allocated memory using Host library function free( ( void * ) oldPacketPtr ); diff --git a/source/Host_IO-POSIX.cpp b/source/Host_IO-POSIX.cpp index cb631ac..97f7ef9 100644 --- a/source/Host_IO-POSIX.cpp +++ b/source/Host_IO-POSIX.cpp @@ -40,7 +40,7 @@ // Make sure off_t is 64 bits and signed. // Due to bug in NDK r12b size of off_t at 32 bit systems is 32 bit despite giving _FILE_OFFSET_BITS=64 flag. So only for Android off64_t is used -static char check_off_t_size [ (sizeof(Host_IO::XMP_off_t) == 8) ? 1 : -1 ]; +// UNUSED -- hub static char check_off_t_size [ (sizeof(Host_IO::XMP_off_t) == 8) ? 1 : -1 ]; // *** No std::numeric_limits? static char check_off_t_sign [ std::numeric_limits<off_t>::is_signed ? -1 : 1 ]; diff --git a/source/XMP_LibUtils.cpp b/source/XMP_LibUtils.cpp index 1ee8b09..dcad3c9 100644 --- a/source/XMP_LibUtils.cpp +++ b/source/XMP_LibUtils.cpp @@ -144,13 +144,13 @@ void XMP_ReadWriteLock::Release() // until the condition is signaled. When the call returns, the mutex is locked again. #define InitializeBasicMutex(mutex) { int err = pthread_mutex_init ( &mutex, 0 ); XMP_Enforce ( err == 0 ); } - #define TerminateBasicMutex(mutex) { int err = pthread_mutex_destroy ( &mutex ); XMP_Enforce_NoThrow ( err == 0 ); } + #define TerminateBasicMutex(mutex) { int err = pthread_mutex_destroy ( &mutex ); (void)err; XMP_Enforce_NoThrow ( err == 0 ); } #define AcquireBasicMutex(mutex) { int err = pthread_mutex_lock ( &mutex ); XMP_Enforce ( err == 0 ); } #define ReleaseBasicMutex(mutex) { int err = pthread_mutex_unlock ( &mutex ); XMP_Enforce ( err == 0 ); } #define InitializeBasicQueue(queue) { int err = pthread_cond_init ( &queue, 0 ); XMP_Enforce ( err == 0 ); } - #define TerminateBasicQueue(queue) { int err = pthread_cond_destroy ( &queue ); XMP_Enforce_NoThrow ( err == 0 ); } + #define TerminateBasicQueue(queue) { int err = pthread_cond_destroy ( &queue ); (void)err; XMP_Enforce_NoThrow ( err == 0 ); } #define WaitOnBasicQueue(queue,mutex) { int err = pthread_cond_wait ( &queue, &mutex ); XMP_Enforce ( err == 0 ); } #define ReleaseOneBasicQueue(queue) { int err = pthread_cond_signal ( &queue ); XMP_Enforce ( err == 0 ); } diff --git a/source/XMP_LibUtils.hpp b/source/XMP_LibUtils.hpp index ac2804a..8ea5b18 100644 --- a/source/XMP_LibUtils.hpp +++ b/source/XMP_LibUtils.hpp @@ -278,7 +278,7 @@ struct ErrorCallbackBox typedef pthread_mutex_t XMP_BasicMutex; #define InitializeBasicMutex(mutex) { int err = pthread_mutex_init ( &mutex, 0 ); XMP_Enforce ( err == 0 ); } - #define TerminateBasicMutex(mutex) { int err = pthread_mutex_destroy ( &mutex ); XMP_Enforce_NoThrow ( err == 0 ); } + #define TerminateBasicMutex(mutex) { int err = pthread_mutex_destroy ( &mutex ); (void)err; XMP_Enforce_NoThrow ( err == 0 ); } #define AcquireBasicMutex(mutex) { int err = pthread_mutex_lock ( &mutex ); XMP_Enforce ( err == 0 ); } #define ReleaseBasicMutex(mutex) { int err = pthread_mutex_unlock ( &mutex ); XMP_Enforce ( err == 0 ); } |