Issue: #940. Changes to eliminate compiler warnings with GCC 4.8.1.2 on Linux.

v0.27.3
Robin Mills 12 years ago
parent 89c796a3ab
commit cea66bdd78

@ -89,6 +89,17 @@ namespace Exiv2 {
#define UNUSED(x) (void)(x)
#if EXV_HAVE_STRERROR_R
#ifndef STRERROR_R_CHAR_P
// man 3 sterror_r
#if ( _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 ) && ! _GNU_SOURCE
// XSI-compliant version of strerror_r() is provided
#else
#define STRERROR_R_CHAR_P
#endif
#endif
#endif
std::string strError()
{
int error = errno;

@ -845,9 +845,9 @@ FindSchemaNode ( XMP_Node * xmpTree,
schemaNode = new XMP_Node ( xmpTree, nsURI, (kXMP_SchemaNode | kXMP_NewImplicitNode) );
XMP_StringPtr prefixPtr;
XMP_StringLen prefixLen;
bool found = false;
found = XMPMeta::GetNamespacePrefix ( nsURI, &prefixPtr, &prefixLen ); // *** Use map directly?
bool found = XMPMeta::GetNamespacePrefix ( nsURI, &prefixPtr, &prefixLen ); // *** Use map directly?
XMP_Assert ( found );
UNUSED(found);
schemaNode->value.assign ( prefixPtr, prefixLen );
xmpTree->children.push_back ( schemaNode );

@ -739,14 +739,14 @@ 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;
flag = ~0UL;
XMP_OptionBits flag = ~0UL;
XMP_Assert ( flag == (XMP_OptionBits)(-1L) );
XMP_Assert ( (flag ^ kXMP_PropHasLang) == 0xFFFFFFBFUL );
XMP_Assert ( (flag & ~kXMP_PropHasLang) == 0xFFFFFFBFUL );
XMP_OptionBits opt1 = 0; // Check the general option bit macros.
XMP_OptionBits opt2 = ~0UL;
XMP_OptionBits opt2 = flag;
XMP_SetOption ( opt1, kXMP_PropValueIsArray );
XMP_ClearOption ( opt2, kXMP_PropValueIsArray );
XMP_Assert ( opt1 == ~opt2 );

@ -602,9 +602,9 @@ static size_t MoveLargestProperty ( XMPMeta & stdXMP, XMPMeta * extXMP, PropSize
printf ( " Move %s, %d bytes\n", propName, propSize );
#endif
bool moved = false;
moved = MoveOneProperty ( stdXMP, extXMP, schemaURI, propName );
bool moved = MoveOneProperty ( stdXMP, extXMP, schemaURI, propName );
XMP_Assert ( moved );
UNUSED(moved);
propSizes.erase ( lastPos );
return propSize;
@ -1845,6 +1845,7 @@ XMPUtils::PackageForJPEG ( const XMPMeta & origXMP,
const char * packetEnd = 0;
packetEnd = sStandardXMP->c_str() + sStandardXMP->size() - kTrailerLen;
XMP_Assert ( XMP_LitMatch ( packetEnd, kPacketTrailer ) );
UNUSED(packetEnd);
size_t extraPadding = kStdXMPLimit - sStandardXMP->size(); // ! Do this before erasing the trailer.
if ( extraPadding > 2047 ) extraPadding = 2047;

Loading…
Cancel
Save