diff --git a/xmpsdk/src/XMPCore_Impl.cpp b/xmpsdk/src/XMPCore_Impl.cpp index 24ff2250..89e65540 100644 --- a/xmpsdk/src/XMPCore_Impl.cpp +++ b/xmpsdk/src/XMPCore_Impl.cpp @@ -845,7 +845,8 @@ FindSchemaNode ( XMP_Node * xmpTree, schemaNode = new XMP_Node ( xmpTree, nsURI, (kXMP_SchemaNode | kXMP_NewImplicitNode) ); XMP_StringPtr prefixPtr; XMP_StringLen prefixLen; - bool found = XMPMeta::GetNamespacePrefix ( nsURI, &prefixPtr, &prefixLen ); // *** Use map directly? + bool found = false; + found = XMPMeta::GetNamespacePrefix ( nsURI, &prefixPtr, &prefixLen ); // *** Use map directly? XMP_Assert ( found ); schemaNode->value.assign ( prefixPtr, prefixLen ); diff --git a/xmpsdk/src/XMPMeta.cpp b/xmpsdk/src/XMPMeta.cpp index b2555636..965d7633 100644 --- a/xmpsdk/src/XMPMeta.cpp +++ b/xmpsdk/src/XMPMeta.cpp @@ -743,7 +743,8 @@ XMPMeta::Initialize() XMP_Assert ( sizeof(XMP_Uns64) == 8 ); XMP_Assert ( sizeof(XMP_OptionBits) == 4 ); // Check that option masking work on all 32 bits. - XMP_OptionBits flag = ~0UL; + XMP_OptionBits flag; + flag = ~0UL; XMP_Assert ( flag == (XMP_OptionBits)(-1L) ); XMP_Assert ( (flag ^ kXMP_PropHasLang) == 0xFFFFFFBFUL ); XMP_Assert ( (flag & ~kXMP_PropHasLang) == 0xFFFFFFBFUL ); diff --git a/xmpsdk/src/XMPUtils.cpp b/xmpsdk/src/XMPUtils.cpp index a0f4f024..e5a8b250 100644 --- a/xmpsdk/src/XMPUtils.cpp +++ b/xmpsdk/src/XMPUtils.cpp @@ -602,7 +602,8 @@ static size_t MoveLargestProperty ( XMPMeta & stdXMP, XMPMeta * extXMP, PropSize printf ( " Move %s, %d bytes\n", propName, propSize ); #endif - bool moved = MoveOneProperty ( stdXMP, extXMP, schemaURI, propName ); + bool moved = false; + moved = MoveOneProperty ( stdXMP, extXMP, schemaURI, propName ); XMP_Assert ( moved ); propSizes.erase ( lastPos ); @@ -1841,7 +1842,8 @@ XMPUtils::PackageForJPEG ( const XMPMeta & origXMP, // Adjust the standard XMP padding to be up to 2KB. XMP_Assert ( (sStandardXMP->size() > kTrailerLen) && (sStandardXMP->size() <= kStdXMPLimit) ); - const char * packetEnd = sStandardXMP->c_str() + sStandardXMP->size() - kTrailerLen; + const char * packetEnd = 0; + packetEnd = sStandardXMP->c_str() + sStandardXMP->size() - kTrailerLen; XMP_Assert ( XMP_LitMatch ( packetEnd, kPacketTrailer ) ); size_t extraPadding = kStdXMPLimit - sStandardXMP->size(); // ! Do this before erasing the trailer.