Fixed compilation error on MSVC when SUPPRESS_WARNINGS is defined. (Thomas Beutlich)

v0.27.3
Andreas Huggel 15 years ago
parent 8d8a433da5
commit 8c7fffdc7d

@ -826,12 +826,16 @@ namespace Exiv2 {
try {
SXMPUtils::ConvertToDate(value, &datetime);
}
catch (const XMP_Error& e) {
#ifndef SUPPRESS_WARNINGS
catch (const XMP_Error& e) {
std::cerr << "Warning: Failed to convert " << from << " to " << to << " (" << e.GetErrMsg() << ")\n";
#endif
return;
}
#else
catch (const XMP_Error&) {
return;
}
#endif // SUPPRESS_WARNINGS
char buf[30];
if (std::string(to) != "Exif.GPSInfo.GPSTimeStamp") {

@ -566,13 +566,19 @@ namespace Exiv2 {
return 0;
}
catch (const XMP_Error& e) {
#ifndef SUPPRESS_WARNINGS
catch (const XMP_Error& e) {
std::cerr << Error(40, e.GetID(), e.GetErrMsg()) << "\n";
#endif
xmpData.clear();
return 3;
}} // XmpParser::decode
}
#else
catch (const XMP_Error&) {
xmpData.clear();
return 3;
}
#endif // SUPPRESS_WARNINGS
} // XmpParser::decode
#else
int XmpParser::decode( XmpData& xmpData,
const std::string& xmpPacket)
@ -681,12 +687,17 @@ namespace Exiv2 {
return 0;
}
catch (const XMP_Error& e) {
#ifndef SUPPRESS_WARNINGS
catch (const XMP_Error& e) {
std::cerr << Error(40, e.GetID(), e.GetErrMsg()) << "\n";
#endif
return 3;
}} // XmpParser::decode
}
#else
catch (const XMP_Error& e) {
return 3;
}
#endif // SUPPRESS_WARNINGS
} // XmpParser::decode
#else
int XmpParser::encode( std::string& /*xmpPacket*/,
const XmpData& xmpData,

Loading…
Cancel
Save