[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:44:13 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=d3e0539
The following commit has been merged in the master branch:
commit d3e0539bacffdb3e0c7c18f02b7500641f8fca40
Author: Mahesh <maheshmhegade at gmail.com>
Date: Sun Jul 20 15:32:11 2014 +0000
Coverity scan fixes CID : 982031 through 982054
---
src/nikonmn.cpp | 4 ++++
src/olympusmn.cpp | 2 ++
src/panasonicmn.cpp | 2 ++
src/pentaxmn_int.hpp | 2 ++
src/samsungmn.cpp | 2 ++
src/tags.cpp | 37 ++++++++++++++++++++++++++++---------
src/tiffimage.cpp | 2 ++
src/types.cpp | 2 ++
8 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
index 28f2508..767aad7 100644
--- a/src/nikonmn.cpp
+++ b/src/nikonmn.cpp
@@ -2488,6 +2488,7 @@ fmountlens[] = {
const Value& value,
const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
if (value.count() != 1 || value.typeId() != unsignedByte || value.toLong() == 0 || value.toLong() == 255) {
return os << "(" << value << ")";
}
@@ -2495,6 +2496,7 @@ fmountlens[] = {
oss.copyfmt(os);
os << std::fixed << std::setprecision(2) << value.toLong() << " Hz";
os.copyfmt(oss);
+ os.flags(f);
return os;
}
@@ -2502,6 +2504,7 @@ fmountlens[] = {
const Value& value,
const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
if (value.count() != 1 || value.typeId() != unsignedByte || value.toLong() == 0 || value.toLong() == 255) {
return os << "(" << value << ")";
}
@@ -2509,6 +2512,7 @@ fmountlens[] = {
oss.copyfmt(os);
os << std::fixed << std::setprecision(2) << value.toLong();
os.copyfmt(oss);
+ os.flags(f);
return os;
}
diff --git a/src/olympusmn.cpp b/src/olympusmn.cpp
index 8820a1d..88b2ce4 100644
--- a/src/olympusmn.cpp
+++ b/src/olympusmn.cpp
@@ -1174,6 +1174,7 @@ namespace Exiv2 {
std::ostream& OlympusMakerNote::print0x0204(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags of( os.flags() );
if ( value.count() == 0
|| value.toRational().second == 0) {
return os << "(" << value << ")";
@@ -1184,6 +1185,7 @@ namespace Exiv2 {
oss.copyfmt(os);
os << std::fixed << std::setprecision(1) << f << "x";
os.copyfmt(oss);
+ os.flags(of);
return os;
} // OlympusMakerNote::print0x0204
diff --git a/src/panasonicmn.cpp b/src/panasonicmn.cpp
index cbfe7bd..7f8624e 100644
--- a/src/panasonicmn.cpp
+++ b/src/panasonicmn.cpp
@@ -320,12 +320,14 @@ namespace Exiv2 {
const Value& value,
const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
std::ostringstream oss;
oss.copyfmt(os);
os << std::fixed << std::setprecision(1)
<< value.toLong() / 3 << _(" EV");
os.copyfmt(oss);
+ os.flags(f);
return os;
} // PanasonicMakerNote::print0x0023
diff --git a/src/pentaxmn_int.hpp b/src/pentaxmn_int.hpp
index 2aba980..26f9465 100644
--- a/src/pentaxmn_int.hpp
+++ b/src/pentaxmn_int.hpp
@@ -93,6 +93,7 @@ namespace Exiv2 {
template <int N, const TagDetails (&array)[N], int count, int ignoredcount, int ignoredcountmax>
std::ostream& printCombiTag(std::ostream& os, const Value& value, const ExifData* metadata)
{
+ std::ios::fmtflags f( os.flags() );
if ((value.count() != count && (value.count() < (count + ignoredcount) || value.count() > (count + ignoredcountmax))) || count > 4) {
return printValue(os, value, metadata);
}
@@ -113,6 +114,7 @@ namespace Exiv2 {
<< std::hex << l << std::dec << ")";
}
+ os.flags(f);
return os;
}
diff --git a/src/samsungmn.cpp b/src/samsungmn.cpp
index 9559f54..6f302fe 100644
--- a/src/samsungmn.cpp
+++ b/src/samsungmn.cpp
@@ -90,6 +90,7 @@ namespace Exiv2 {
//! Print the 35mm focal length
std::ostream& printFocalLength35(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
if (value.count() != 1 || value.typeId() != unsignedLong) {
return os << value;
}
@@ -103,6 +104,7 @@ namespace Exiv2 {
os << std::fixed << std::setprecision(1) << length / 10.0 << " mm";
os.copyfmt(oss);
}
+ os.flags(f);
return os;
}
diff --git a/src/tags.cpp b/src/tags.cpp
index 08558d8..927d718 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -2277,6 +2277,7 @@ namespace Exiv2 {
std::ostream& printDegrees(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
if (value.count() == 3) {
std::ostringstream oss;
oss.copyfmt(os);
@@ -2301,7 +2302,7 @@ namespace Exiv2 {
else {
os << value;
}
-
+ os.flags(f);
return os;
} // printDegrees
@@ -2348,6 +2349,7 @@ namespace Exiv2 {
std::ostream& print0x0006(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
std::ostringstream oss;
oss.copyfmt(os);
const int32_t d = value.toRational().second;
@@ -2356,11 +2358,13 @@ namespace Exiv2 {
os << std::fixed << std::setprecision(p) << value.toFloat() << " m";
os.copyfmt(oss);
+ os.flags(f);
return os;
}
std::ostream& print0x0007(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
if (value.count() == 3) {
for (int i = 0; i < 3; ++i) {
if (value.toRational(i).second == 0) {
@@ -2390,6 +2394,7 @@ namespace Exiv2 {
os << value;
}
+ os.flags(f);
return os;
}
@@ -2472,6 +2477,7 @@ namespace Exiv2 {
std::ostream& print0x829d(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
Rational fnumber = value.toRational();
if (fnumber.second != 0) {
std::ostringstream oss;
@@ -2483,6 +2489,7 @@ namespace Exiv2 {
else {
os << "(" << value << ")";
}
+ os.flags(f);
return os;
}
@@ -2529,6 +2536,7 @@ namespace Exiv2 {
std::ostream& print0x9202(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
if ( value.count() == 0
|| value.toRational().second == 0) {
return os << "(" << value << ")";
@@ -2537,6 +2545,7 @@ namespace Exiv2 {
oss.copyfmt(os);
os << "F" << std::setprecision(2) << fnumber(value.toFloat());
os.copyfmt(oss);
+ os.flags(f);
return os;
}
@@ -2564,6 +2573,7 @@ namespace Exiv2 {
std::ostream& print0x9206(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
Rational distance = value.toRational();
if (distance.first == 0) {
os << _("Unknown");
@@ -2582,6 +2592,7 @@ namespace Exiv2 {
else {
os << "(" << value << ")";
}
+ os.flags(f);
return os;
}
@@ -2597,6 +2608,7 @@ namespace Exiv2 {
std::ostream& print0x920a(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
Rational length = value.toRational();
if (length.second != 0) {
std::ostringstream oss;
@@ -2609,6 +2621,7 @@ namespace Exiv2 {
else {
os << "(" << value << ")";
}
+ os.flags(f);
return os;
}
@@ -2661,6 +2674,7 @@ namespace Exiv2 {
std::ostream& print0xa404(std::ostream& os, const Value& value, const ExifData*)
{
+ std::ios::fmtflags f( os.flags() );
Rational zoom = value.toRational();
if (zoom.second == 0) {
os << _("Digital zoom not used");
@@ -2672,6 +2686,7 @@ namespace Exiv2 {
<< (float)zoom.first / zoom.second;
os.copyfmt(oss);
}
+ os.flags(f);
return os;
}
@@ -3109,15 +3124,19 @@ namespace Exiv2 {
std::ostream& operator<<(std::ostream& os, const TagInfo& ti)
{
+ std::ios::fmtflags f( os.flags() );
ExifKey exifKey(ti);
- return os << exifKey.tagName() << ", "
- << std::dec << exifKey.tag() << ", "
- << "0x" << std::setw(4) << std::setfill('0')
- << std::right << std::hex << exifKey.tag() << ", "
- << exifKey.groupName() << ", "
- << exifKey.key() << ", "
- << TypeInfo::typeName(exifKey.defaultTypeId()) << ", "
- << exifKey.tagDesc();
+ os << exifKey.tagName() << ", "
+ << std::dec << exifKey.tag() << ", "
+ << "0x" << std::setw(4) << std::setfill('0')
+ << std::right << std::hex << exifKey.tag() << ", "
+ << exifKey.groupName() << ", "
+ << exifKey.key() << ", "
+ << TypeInfo::typeName(exifKey.defaultTypeId()) << ", "
+ << exifKey.tagDesc();
+
+ os.flags(f);
+ return os;
}
} // namespace Exiv2
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index cb85835..3912678 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -2050,6 +2050,7 @@ namespace Exiv2 {
void TiffHeaderBase::print(std::ostream& os, const std::string& prefix) const
{
+ std::ios::fmtflags f( os.flags() );
os << prefix
<< _("TIFF header, offset") << " = 0x"
<< std::setw(8) << std::setfill('0') << std::hex << std::right
@@ -2061,6 +2062,7 @@ namespace Exiv2 {
case invalidByteOrder: break;
}
os << "
";
+ os.flags(f);
} // TiffHeaderBase::print
ByteOrder TiffHeaderBase::byteOrder() const
diff --git a/src/types.cpp b/src/types.cpp
index 6b77e8f..c5a7015 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -444,6 +444,7 @@ namespace Exiv2 {
{
const std::string::size_type pos = 8 + 16 * 3 + 2;
const std::string align(pos, ' ');
+ std::ios::fmtflags f( os.flags() );
long i = 0;
while (i < len) {
@@ -461,6 +462,7 @@ namespace Exiv2 {
os << (width > pos ? "" : align.substr(width)) << ss.str() << "
";
}
os << std::dec << std::setfill(' ');
+ os.flags(f);
} // hexdump
bool isHex(const std::string& str, size_t size, const std::string& prefix)
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list