[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:37:11 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=043a4a3
The following commit has been merged in the master branch:
commit 043a4a348bc52d9f94536449b370002caf6d4cda
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat Jul 9 10:38:09 2005 +0000
Added #ifndef SUPPRESS_WARNINGS blocks around all output from the library: compile with -DSUPPRESS_WARNINGS for a quiet library
---
src/canonmn.cpp | 5 +----
src/exif.cpp | 3 ++-
src/fujimn.cpp | 3 ---
src/ifd.cpp | 12 ++++++++----
src/iptc.cpp | 3 ---
src/makernote.cpp | 2 ++
src/olympusmn.cpp | 3 ---
src/panasonicmn.cpp | 3 ---
src/sigmamn.cpp | 3 ---
src/sonymn.cpp | 3 ---
10 files changed, 13 insertions(+), 27 deletions(-)
diff --git a/src/canonmn.cpp b/src/canonmn.cpp
index a431b6c..d43e836 100644
--- a/src/canonmn.cpp
+++ b/src/canonmn.cpp
@@ -49,9 +49,6 @@ EXIV2_RCSID("@(#) $Id$");
#include <cstring>
#include <cmath>
-// Define DEBUG_MAKERNOTE to output debug information to std::cerr
-#undef DEBUG_MAKERNOTE
-
// *****************************************************************************
// local declarations
namespace {
@@ -90,7 +87,7 @@ namespace Exiv2 {
canonCs2IfdId, MakerNote::AutoPtr(new CanonMakerNote));
MakerNoteFactory::registerMakerNote(
canonCfIfdId, MakerNote::AutoPtr(new CanonMakerNote));
-
+
ExifTags::registerMakerTagInfo(canonIfdId, tagInfo_);
ExifTags::registerMakerTagInfo(canonCs1IfdId, tagInfoCs1_);
ExifTags::registerMakerTagInfo(canonCs2IfdId, tagInfoCs2_);
diff --git a/src/exif.cpp b/src/exif.cpp
index 4090359..63a139c 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -503,9 +503,10 @@ namespace Exiv2 {
byteOrder(),
pExifIfd_->offset() + pos->offset());
if (rc) {
- // Todo: How to handle debug output like this
+#ifndef SUPPRESS_WARNINGS
std::cerr << "Warning: Failed to read Makernote, rc = "
<< rc << "
";
+#endif
delete pMakerNote_;
pMakerNote_ = 0;
}
diff --git a/src/fujimn.cpp b/src/fujimn.cpp
index c1b811c..7e7943c 100644
--- a/src/fujimn.cpp
+++ b/src/fujimn.cpp
@@ -46,9 +46,6 @@ EXIV2_RCSID("@(#) $Id$");
#include <iomanip>
#include <cassert>
-// Define DEBUG_MAKERNOTE to output debug information to std::cerr
-#undef DEBUG_MAKERNOTE
-
// *****************************************************************************
// class member definitions
namespace Exiv2 {
diff --git a/src/ifd.cpp b/src/ifd.cpp
index 72ec0ed..7532a86 100644
--- a/src/ifd.cpp
+++ b/src/ifd.cpp
@@ -313,10 +313,11 @@ namespace Exiv2 {
for (int i = 0; i < n; ++i) {
if (len < o + 12) {
- // Todo: How to handle debug output like this
+#ifndef SUPPRESS_WARNINGS
std::cerr << "Error: " << ExifTags::ifdName(ifdId_)
<< " entry " << i
<< " lies outside of the IFD memory buffer.
";
+#endif
rc = 6;
break;
}
@@ -333,10 +334,11 @@ namespace Exiv2 {
}
if (rc == 0 && hasNext_) {
if (len < o + 4) {
- // Todo: How to handle debug output like this
+#ifndef SUPPRESS_WARNINGS
std::cerr << "Error: " << ExifTags::ifdName(ifdId_)
<< " memory of the pointer to the next IFD"
<< " lies outside of the IFD memory buffer.
";
+#endif
rc = 6;
}
else {
@@ -369,7 +371,7 @@ namespace Exiv2 {
}
// Set the offset of the first data entry outside of the IFD
if (i->offset_ - offset_ >= len) {
- // Todo: How to handle debug output like this
+#ifndef SUPPRESS_WARNINGS
std::cerr << "Error: Offset of the 1st data entry of "
<< ExifTags::ifdName(ifdId_)
<< " is out of bounds:
"
@@ -379,6 +381,7 @@ namespace Exiv2 {
<< ", exceeds buffer size by "
<< std::dec << i->offset_ - len
<< " Bytes
";
+#endif
rc = 6;
}
else {
@@ -402,7 +405,7 @@ namespace Exiv2 {
long tmpOffset =
i->size_ > 4 ? i->offset_ - offset_ : i->offsetLoc_;
if (tmpOffset + i->size_ > len) {
- // Todo: How to handle debug output like this
+#ifndef SUPPRESS_WARNINGS
std::cerr << "Warning: Upper boundary of data for "
<< ExifTags::ifdName(ifdId_)
<< " entry " << static_cast<int>(i - begin)
@@ -414,6 +417,7 @@ namespace Exiv2 {
<< ", exceeds buffer size by "
<< tmpOffset + i->size_ - len
<< " Bytes; Truncating the data.
";
+#endif
// Truncate the entry
i->size_ = 0;
i->count_ = 0;
diff --git a/src/iptc.cpp b/src/iptc.cpp
index 7b16eec..6dc34c9 100644
--- a/src/iptc.cpp
+++ b/src/iptc.cpp
@@ -28,9 +28,6 @@
#include "rcsid.hpp"
EXIV2_RCSID("@(#) $Id$");
-// Define DEBUG_MAKERNOTE to output debug information to std::cerr
-#undef DEBUG_MAKERNOTE
-
// *****************************************************************************
// included header files
#include "iptc.hpp"
diff --git a/src/makernote.cpp b/src/makernote.cpp
index d792d54..4654228 100644
--- a/src/makernote.cpp
+++ b/src/makernote.cpp
@@ -103,9 +103,11 @@ namespace Exiv2 {
if (rc == 0) {
// IfdMakerNote currently does not support multiple IFDs
if (ifd_.next() != 0) {
+#ifndef SUPPRESS_WARNINGS
std::cerr << "Warning: Makernote IFD has a next pointer != 0 ("
<< ifd_.next()
<< "). Ignored.
";
+#endif
}
}
#ifdef DEBUG_MAKERNOTE
diff --git a/src/olympusmn.cpp b/src/olympusmn.cpp
index f073844..ee32223 100644
--- a/src/olympusmn.cpp
+++ b/src/olympusmn.cpp
@@ -44,9 +44,6 @@ EXIV2_RCSID("@(#) $Id$");
#include <iomanip>
#include <cassert>
-// Define DEBUG_MAKERNOTE to output debug information to std::cerr
-#undef DEBUG_MAKERNOTE
-
// *****************************************************************************
// class member definitions
namespace Exiv2 {
diff --git a/src/panasonicmn.cpp b/src/panasonicmn.cpp
index 9e69cbc..c49dccb 100644
--- a/src/panasonicmn.cpp
+++ b/src/panasonicmn.cpp
@@ -42,9 +42,6 @@ EXIV2_RCSID("@(#) $Id$");
#include <iomanip>
#include <cassert>
-// Define DEBUG_MAKERNOTE to output debug information to std::cerr
-#undef DEBUG_MAKERNOTE
-
// *****************************************************************************
// class member definitions
namespace Exiv2 {
diff --git a/src/sigmamn.cpp b/src/sigmamn.cpp
index 7d63365..a06705c 100644
--- a/src/sigmamn.cpp
+++ b/src/sigmamn.cpp
@@ -44,9 +44,6 @@ EXIV2_RCSID("@(#) $Id$");
#include <iomanip>
#include <cassert>
-// Define DEBUG_MAKERNOTE to output debug information to std::cerr
-#undef DEBUG_MAKERNOTE
-
// *****************************************************************************
// class member definitions
namespace Exiv2 {
diff --git a/src/sonymn.cpp b/src/sonymn.cpp
index 051029c..3ac2fcc 100644
--- a/src/sonymn.cpp
+++ b/src/sonymn.cpp
@@ -41,9 +41,6 @@ EXIV2_RCSID("@(#) $Id$");
#include <iomanip>
#include <cassert>
-// Define DEBUG_MAKERNOTE to output debug information to std::cerr
-#undef DEBUG_MAKERNOTE
-
// *****************************************************************************
// class member definitions
namespace Exiv2 {
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list