[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:38:45 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=52ddfc5

The following commit has been merged in the master branch:
commit 52ddfc5938bec65cd28638651b363664b616eb8e
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Mon Sep 24 14:30:10 2007 +0000

    Minor cleanup (memset -> std::memset, memcpy -> std::memcpy).
---
 src/actions.cpp     |  4 ++--
 src/canonmn.cpp     |  4 ++--
 src/crwedit.cpp     |  3 ++-
 src/crwimage.cpp    | 16 ++++++++--------
 src/exif.cpp        | 12 ++++++------
 src/fujimn.cpp      |  3 ++-
 src/futils.cpp      |  4 ++--
 src/ifd-test.cpp    |  6 +++---
 src/ifd.cpp         | 48 ++++++++++++++++++++++++------------------------
 src/jpgimage.cpp    | 12 ++++++------
 src/makernote2.cpp  | 15 ++++++++-------
 src/minoltamn.cpp   |  9 +++++----
 src/nikonmn.cpp     |  4 ++--
 src/olympusmn.cpp   |  3 ++-
 src/panasonicmn.cpp |  3 ++-
 src/pngchunk.cpp    |  2 +-
 src/sigmamn.cpp     |  3 ++-
 src/sonymn.cpp      |  3 ++-
 src/value.cpp       | 12 ++++++------
 19 files changed, 87 insertions(+), 79 deletions(-)

diff --git a/src/actions.cpp b/src/actions.cpp
index d14db7d..03c9454 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -1605,7 +1605,7 @@ namespace {
         if (   timeStr[4]  != ':' || timeStr[7]  != ':' || timeStr[10] != ' '
             || timeStr[13] != ':' || timeStr[16] != ':') return 3;
         if (0 == tm) return 4;
-        memset(tm, 0x0, sizeof(struct tm));
+        std::memset(tm, 0x0, sizeof(struct tm));
         tm->tm_isdst = -1;
 
         long tmp;
@@ -1731,7 +1731,7 @@ namespace {
 
         const size_t max = 1024;
         char basename[max];
-        memset(basename, 0x0, max);
+        std::memset(basename, 0x0, max);
         if (strftime(basename, max, format.c_str(), tm) == 0) {
             std::cerr << _("Filename format yields empty filename for the file") << " "
                       << path << "
";
diff --git a/src/canonmn.cpp b/src/canonmn.cpp
index cbfd5c8..2e9515d 100644
--- a/src/canonmn.cpp
+++ b/src/canonmn.cpp
@@ -890,7 +890,7 @@ namespace Exiv2 {
                                   ByteOrder byteOrder) const
     {
         DataBuf buf(1024);
-        memset(buf.pData_, 0x0, 1024);
+        std::memset(buf.pData_, 0x0, 1024);
         uint16_t len = 0;
         Entries::const_iterator end = entries_.end();
         for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
@@ -898,7 +898,7 @@ namespace Exiv2 {
                 uint16_t pos = i->tag() * 2;
                 uint16_t size = pos + static_cast<uint16_t>(i->size());
                 assert(size <= 1024);
-                memcpy(buf.pData_ + pos, i->data(), i->size());
+                std::memcpy(buf.pData_ + pos, i->data(), i->size());
                 if (len < size) len = size;
             }
         }
diff --git a/src/crwedit.cpp b/src/crwedit.cpp
index 87c3790..3a176a3 100644
--- a/src/crwedit.cpp
+++ b/src/crwedit.cpp
@@ -7,6 +7,7 @@
 
 #include <iostream>
 #include <string>
+#include <cstring>
 
 void remove(Exiv2::CiffHeader* pHead);
 void add(Exiv2::CiffHeader* pHead);
@@ -117,7 +118,7 @@ void add(Exiv2::CiffHeader* pHead)
     std::cin >> cmd;
     if (cmd != 'n' && cmd != 'N') {
         Exiv2::DataBuf buf(size);
-        memset(buf.pData_, 0xaa, size);
+        std::memset(buf.pData_, 0xaa, size);
         pHead->add(crwTag, crwDir, buf);
     }
     else {
diff --git a/src/crwimage.cpp b/src/crwimage.cpp
index 2afc614..c95bdbe 100644
--- a/src/crwimage.cpp
+++ b/src/crwimage.cpp
@@ -1133,15 +1133,15 @@ namespace Exiv2 {
             uint32_t size = static_cast<uint32_t>(comment.size());
             if (cc && cc->size() > size) size = cc->size();
             DataBuf buf(size);
-            memset(buf.pData_, 0x0, buf.size_);
-            memcpy(buf.pData_, comment.data(), comment.size());
+            std::memset(buf.pData_, 0x0, buf.size_);
+            std::memcpy(buf.pData_, comment.data(), comment.size());
             pHead->add(pCrwMapping->crwTagId_, pCrwMapping->crwDir_, buf);
         }
         else {
             if (cc) {
                 // Just delete the value, do not remove the tag
                 DataBuf buf(cc->size());
-                memset(buf.pData_, 0x0, buf.size_);
+                std::memset(buf.pData_, 0x0, buf.size_);
                 cc->setValue(buf);
             }
         }
@@ -1216,13 +1216,13 @@ namespace Exiv2 {
         const ExifData::const_iterator ed = image.exifData().findKey(key);
         if (ed != image.exifData().end()) {
             struct tm tm;
-            memset(&tm, 0x0, sizeof(tm));
+            std::memset(&tm, 0x0, sizeof(tm));
             int rc = exifTime(ed->toString().c_str(), &tm);
             if (rc == 0) t = timegm(&tm);
         }
         if (t != 0) {
             DataBuf buf(12);
-            memset(buf.pData_, 0x0, 12);
+            std::memset(buf.pData_, 0x0, 12);
             ul2Data(buf.pData_, static_cast<uint32_t>(t), pHead->byteOrder());
             pHead->add(pCrwMapping->crwTagId_, pCrwMapping->crwDir_, buf);
         }
@@ -1252,8 +1252,8 @@ namespace Exiv2 {
             uint32_t size = 28;
             if (cc && cc->size() > size) size = cc->size();
             DataBuf buf(size);
-            memset(buf.pData_, 0x0, buf.size_);
-            if (cc) memcpy(buf.pData_ + 8, cc->pData() + 8, cc->size() - 8);
+            std::memset(buf.pData_, 0x0, buf.size_);
+            if (cc) std::memcpy(buf.pData_ + 8, cc->pData() + 8, cc->size() - 8);
             if (edX != edEnd && edX->size() == 4) {
                 edX->copy(buf.pData_, pHead->byteOrder());
             }
@@ -1325,7 +1325,7 @@ namespace Exiv2 {
     {
         const uint16_t size = 1024;
         DataBuf buf(size);
-        memset(buf.pData_, 0x0, buf.size_);
+        std::memset(buf.pData_, 0x0, buf.size_);
 
         uint16_t len = 0;
         const ExifData::const_iterator b = exifData.begin();
diff --git a/src/exif.cpp b/src/exif.cpp
index c5d8ee9..7a033ec 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -240,7 +240,7 @@ namespace Exiv2 {
             lastSize = size;
             if (len < offset + size) return 1;
 
-            memcpy(stripsBuf.pData_ + currentOffset, buf + offset, size);
+            std::memcpy(stripsBuf.pData_ + currentOffset, buf + offset, size);
             os << currentOffset << " ";
             currentOffset += size;
         }
@@ -348,7 +348,7 @@ namespace Exiv2 {
     {
         pData_ = new byte[rhs.size_];
         size_ = rhs.size_;
-        memcpy(pData_, rhs.pData_, rhs.size_);
+        std::memcpy(pData_, rhs.pData_, rhs.size_);
 
         if (rhs.pTiffHeader_) {
             pTiffHeader_ = new TiffHeader(*rhs.pTiffHeader_);
@@ -401,7 +401,7 @@ namespace Exiv2 {
         delete[] pData_;
         pData_ = new byte[rhs.size_];
         size_ = rhs.size_;
-        memcpy(pData_, rhs.pData_, rhs.size_);
+        std::memcpy(pData_, rhs.pData_, rhs.size_);
 
         delete pTiffHeader_;
         pTiffHeader_ = 0;
@@ -466,7 +466,7 @@ namespace Exiv2 {
 
         // Copy the data buffer
         DataBuf tmpData(len);
-        memcpy(tmpData.pData_, buf, len);
+        std::memcpy(tmpData.pData_, buf, len);
 
         // Read the TIFF header
         std::auto_ptr<TiffHeader> tmpTiffHeader(new TiffHeader);
@@ -609,7 +609,7 @@ namespace Exiv2 {
             std::cerr << "->>>>>> using non-intrusive writing <<<<<<-
";
 #endif
             buf.alloc(size_);
-            memcpy(buf.pData_, pData_, size_);
+            std::memcpy(buf.pData_, pData_, size_);
         }
         // Else we have to do it the hard way...
         else {
@@ -644,7 +644,7 @@ namespace Exiv2 {
             e.setIfdId(exifIfd.ifdId());
             e.setTag(0x927c);
             DataBuf tmpBuf(makerNote->size());
-            memset(tmpBuf.pData_, 0x0, tmpBuf.size_);
+            std::memset(tmpBuf.pData_, 0x0, tmpBuf.size_);
             e.setValue(undefined, tmpBuf.size_, tmpBuf.pData_, tmpBuf.size_);
             exifIfd.erase(0x927c);
             exifIfd.add(e);
diff --git a/src/fujimn.cpp b/src/fujimn.cpp
index dd716c3..4c571a3 100644
--- a/src/fujimn.cpp
+++ b/src/fujimn.cpp
@@ -44,6 +44,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <sstream>
 #include <iomanip>
 #include <cassert>
+#include <cstring>
 
 // *****************************************************************************
 // class member definitions
@@ -317,7 +318,7 @@ namespace Exiv2 {
         if (len < 12) return 1;
 
         header_.alloc(12);
-        memcpy(header_.pData_, buf, header_.size_);
+        std::memcpy(header_.pData_, buf, header_.size_);
         // Read offset to the IFD relative to the start of the makernote
         // from the header. Note that we ignore the byteOrder paramter
         start_ = getUShort(header_.pData_ + 8, byteOrder_);
diff --git a/src/futils.cpp b/src/futils.cpp
index 2067fed..251043c 100644
--- a/src/futils.cpp
+++ b/src/futils.cpp
@@ -84,11 +84,11 @@ namespace Exiv2 {
 # ifdef EXV_STRERROR_R_CHAR_P
         char *buf = 0;
         char buf2[n];
-        memset(buf2, 0x0, n);
+        std::memset(buf2, 0x0, n);
         buf = strerror_r(error, buf2, n);
 # else
         char buf[n];
-        memset(buf, 0x0, n);
+        std::memset(buf, 0x0, n);
         strerror_r(error, buf, n);
 # endif
         os << buf;
diff --git a/src/ifd-test.cpp b/src/ifd-test.cpp
index 014a736..9ac787a 100644
--- a/src/ifd-test.cpp
+++ b/src/ifd-test.cpp
@@ -194,9 +194,9 @@ try {
     ifd5.print(std::cout);
 
     Exiv2::byte* newBuf = new Exiv2::byte[len];
-    memset(newBuf, 0x00, len);
-    memcpy(newBuf, buf, len);
-    memset(buf, 0x0, len);
+    std::memset(newBuf, 0x00, len);
+    std::memcpy(newBuf, buf, len);
+    std::memset(buf, 0x0, len);
     ifd5.updateBase(newBuf);
     ifd5.print(std::cout);
     delete[] newBuf;
diff --git a/src/ifd.cpp b/src/ifd.cpp
index 6d45ea8..f3836cf 100644
--- a/src/ifd.cpp
+++ b/src/ifd.cpp
@@ -74,11 +74,11 @@ namespace Exiv2 {
         if (alloc_) {
             if (rhs.pData_) {
                 pData_ = new byte[rhs.size()];
-                memcpy(pData_, rhs.pData_, rhs.size());
+                std::memcpy(pData_, rhs.pData_, rhs.size());
             }
             if (rhs.pDataArea_) {
                 pDataArea_ = new byte[rhs.sizeDataArea()];
-                memcpy(pDataArea_, rhs.pDataArea_, rhs.sizeDataArea());
+                std::memcpy(pDataArea_, rhs.pDataArea_, rhs.sizeDataArea());
             }
         }
         else {
@@ -105,13 +105,13 @@ namespace Exiv2 {
             pData_ = 0;
             if (rhs.pData_) {
                 pData_ = new byte[rhs.size()];
-                memcpy(pData_, rhs.pData_, rhs.size());
+                std::memcpy(pData_, rhs.pData_, rhs.size());
             }
             delete[] pDataArea_;
             pDataArea_ = 0;
             if (rhs.pDataArea_) {
                 pDataArea_ = new byte[rhs.sizeDataArea()];
-                memcpy(pDataArea_, rhs.pDataArea_, rhs.sizeDataArea());
+                std::memcpy(pDataArea_, rhs.pDataArea_, rhs.sizeDataArea());
             }
         }
         else {
@@ -144,8 +144,8 @@ namespace Exiv2 {
         if (alloc_) {
             delete[] pData_;
             pData_ = new byte[len];
-            memset(pData_, 0x0, len);
-            memcpy(pData_, buf, dataSize);
+            std::memset(pData_, 0x0, len);
+            std::memcpy(pData_, buf, dataSize);
             size_ = len;
         }
         else {
@@ -157,8 +157,8 @@ namespace Exiv2 {
             else {
                 // Overwrite existing data if it fits into the buffer
                 if (size_ < dataSize) throw Error(24, tag(), dataSize, size_);
-                memset(pData_, 0x0, size_);
-                memcpy(pData_, buf, dataSize);
+                std::memset(pData_, 0x0, size_);
+                std::memcpy(pData_, buf, dataSize);
                 // do not change size_
             }
         }
@@ -171,7 +171,7 @@ namespace Exiv2 {
         if (alloc_) {
             delete[] pDataArea_;
             pDataArea_ = new byte[len];
-            memcpy(pDataArea_, buf, len);
+            std::memcpy(pDataArea_, buf, len);
             sizeDataArea_ = len;
         }
         else {
@@ -185,8 +185,8 @@ namespace Exiv2 {
                 if (sizeDataArea_ < len) {
                     throw Error(25, tag(), sizeDataArea_, len);
                 }
-                memset(pDataArea_, 0x0, sizeDataArea_);
-                memcpy(pDataArea_, buf, len);
+                std::memset(pDataArea_, 0x0, sizeDataArea_);
+                std::memcpy(pDataArea_, buf, len);
                 // do not change sizeDataArea_
             }
         }
@@ -270,7 +270,7 @@ namespace Exiv2 {
           dataOffset_(0), hasNext_(true), pNext_(0), next_(0)
     {
         pNext_ = new byte[4];
-        memset(pNext_, 0x0, 4);
+        std::memset(pNext_, 0x0, 4);
     }
 
     Ifd::Ifd(IfdId ifdId, long offset)
@@ -278,7 +278,7 @@ namespace Exiv2 {
           dataOffset_(0), hasNext_(true), pNext_(0), next_(0)
     {
         pNext_ = new byte[4];
-        memset(pNext_, 0x0, 4);
+        std::memset(pNext_, 0x0, 4);
     }
 
     Ifd::Ifd(IfdId ifdId, long offset, bool alloc, bool hasNext)
@@ -287,7 +287,7 @@ namespace Exiv2 {
     {
         if (alloc_ && hasNext_) {
             pNext_ = new byte[4];
-            memset(pNext_, 0x0, 4);
+            std::memset(pNext_, 0x0, 4);
         }
     }
 
@@ -304,8 +304,8 @@ namespace Exiv2 {
     {
         if (alloc_ && hasNext_) {
             pNext_ = new byte[4];
-            memset(pNext_, 0x0, 4);
-            if (rhs.pNext_) memcpy(pNext_, rhs.pNext_, 4);
+            std::memset(pNext_, 0x0, 4);
+            if (rhs.pNext_) std::memcpy(pNext_, rhs.pNext_, 4);
         }
     }
 
@@ -386,7 +386,7 @@ namespace Exiv2 {
             }
             else {
                 if (alloc_) {
-                    memcpy(pNext_, buf + o, 4);
+                    std::memcpy(pNext_, buf + o, 4);
                 }
                 else {
                     pNext_ = const_cast<byte*>(buf + o);
@@ -587,8 +587,8 @@ namespace Exiv2 {
             }
             else {
                 // Copy data into the offset field
-                memset(buf + o + 8, 0x0, 4);
-                memcpy(buf + o + 8, i->data(), i->size());
+                std::memset(buf + o + 8, 0x0, 4);
+                std::memcpy(buf + o + 8, i->data(), i->size());
             }
             o += 12;
         }
@@ -596,10 +596,10 @@ namespace Exiv2 {
         if (hasNext_) {
             // Add the offset to the next IFD to the data buffer
             if (pNext_) {
-                memcpy(buf + o, pNext_, 4);
+                std::memcpy(buf + o, pNext_, 4);
             }
             else {
-                memset(buf + o, 0x0, 4);
+                std::memset(buf + o, 0x0, 4);
             }
             o += 4;
         }
@@ -607,7 +607,7 @@ namespace Exiv2 {
         // Add the data of all IFD entries to the data buffer
         for (i = b; i != e; ++i) {
             if (i->size() > 4) {
-                memcpy(buf + o, i->data(), i->size());
+                std::memcpy(buf + o, i->data(), i->size());
                 o += i->size();
             }
         }
@@ -615,7 +615,7 @@ namespace Exiv2 {
         // Add all data areas to the data buffer
         for (i = b; i != e; ++i) {
             if (i->sizeDataArea() > 0) {
-                memcpy(buf + o, i->dataArea(), i->sizeDataArea());
+                std::memcpy(buf + o, i->dataArea(), i->sizeDataArea());
                 o += i->sizeDataArea();
             }
         }
@@ -630,7 +630,7 @@ namespace Exiv2 {
         dataOffset_ = 0;
         if (hasNext_) {
             if (alloc_) {
-                memset(pNext_, 0x0, 4);
+                std::memset(pNext_, 0x0, 4);
             }
             else {
                 pBase_ = 0;
diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp
index 4c04def..3d2c6e8 100644
--- a/src/jpgimage.cpp
+++ b/src/jpgimage.cpp
@@ -168,7 +168,7 @@ namespace Exiv2 {
         DataBuf rawIptc(iptcData.copy());
         if (rawIptc.size_ > 0) {
             byte tmpBuf[12];
-            memcpy(tmpBuf, Photoshop::bimId_, 4);
+            std::memcpy(tmpBuf, Photoshop::bimId_, 4);
             us2Data(tmpBuf + 4, iptc_, bigEndian);
             tmpBuf[6] = 0;
             tmpBuf[7] = 0;
@@ -256,7 +256,7 @@ namespace Exiv2 {
 
         while (marker != sos_ && marker != eoi_ && search > 0) {
             // Read size and signature (ok if this hits EOF)
-            memset(buf.pData_, 0x0, buf.size_);
+            std::memset(buf.pData_, 0x0, buf.size_);
             bufRead = io_->read(buf.pData_, bufMinSize);
             if (io_->error()) throw Error(14);
             if (bufRead < 2) throw Error(15);
@@ -515,7 +515,7 @@ namespace Exiv2 {
 
                         if (rawExif.size_ + 8 > 0xffff) throw Error(37, "Exif");
                         us2Data(tmpBuf + 2, static_cast<uint16_t>(rawExif.size_ + 8), bigEndian);
-                        memcpy(tmpBuf + 4, exifId_, 6);
+                        std::memcpy(tmpBuf + 4, exifId_, 6);
                         if (outIo.write(tmpBuf, 10) != 10) throw Error(21);
 
                         // Write new Exif data buffer
@@ -539,7 +539,7 @@ namespace Exiv2 {
 
                     if (xmpPacket_.size() + 31 > 0xffff) throw Error(37, "XMP");
                     us2Data(tmpBuf + 2, static_cast<uint16_t>(xmpPacket_.size() + 31), bigEndian);
-                    memcpy(tmpBuf + 4, xmpId_, 29);
+                    std::memcpy(tmpBuf + 4, xmpId_, 29);
                     if (outIo.write(tmpBuf, 33) != 33) throw Error(21);
 
                     // Write new XMP packet
@@ -561,7 +561,7 @@ namespace Exiv2 {
 
                         if (newPsData.size_ + 16 > 0xffff) throw Error(37, "IPTC");
                         us2Data(tmpBuf + 2, static_cast<uint16_t>(newPsData.size_ + 16), bigEndian);
-                        memcpy(tmpBuf + 4, Photoshop::ps3Id_, 14);
+                        std::memcpy(tmpBuf + 4, Photoshop::ps3Id_, 14);
                         if (outIo.write(tmpBuf, 18) != 18) throw Error(21);
                         if (outIo.error()) throw Error(21);
 
@@ -689,7 +689,7 @@ namespace Exiv2 {
         byte tmpBuf[7];
         tmpBuf[0] = 0xff;
         tmpBuf[1] = 0x01;
-        memcpy(tmpBuf + 2, exiv2Id_, 5);
+        std::memcpy(tmpBuf + 2, exiv2Id_, 5);
         if (outIo.write(tmpBuf, 7) != 7) return 4;
         if (outIo.error()) return 4;
         return 0;
diff --git a/src/makernote2.cpp b/src/makernote2.cpp
index e9419ad..317a349 100644
--- a/src/makernote2.cpp
+++ b/src/makernote2.cpp
@@ -43,6 +43,7 @@ EXIV2_RCSID("@(#) $Id$")
 
 // + standard includes
 #include <string>
+#include <cstring>
 
 // *****************************************************************************
 // class member definitions
@@ -152,7 +153,7 @@ namespace Exiv2 {
         if (size < size_) return false;
 
         header_.alloc(size_);
-        memcpy(header_.pData_, pData, header_.size_);
+        std::memcpy(header_.pData_, pData, header_.size_);
         if (   static_cast<uint32_t>(header_.size_) < size_
             || 0 != memcmp(header_.pData_, signature_, 5)) {
             return false;
@@ -180,7 +181,7 @@ namespace Exiv2 {
         if (size < size_) return false;
 
         header_.alloc(size_);
-        memcpy(header_.pData_, pData, header_.size_);
+        std::memcpy(header_.pData_, pData, header_.size_);
 
         // Read offset to the IFD relative to the start of the makernote
         // from the header. Note that we ignore the byteOrder argument
@@ -213,7 +214,7 @@ namespace Exiv2 {
         if (size < size_) return false;
         if (0 != memcmp(pData, signature_, 6)) return false;
         buf_.alloc(size_);
-        memcpy(buf_.pData_, pData, buf_.size_);
+        std::memcpy(buf_.pData_, pData, buf_.size_);
         start_ = size_;
         return true;
 
@@ -239,7 +240,7 @@ namespace Exiv2 {
         if (size < size_) return false;
         if (0 != memcmp(pData, signature_, 6)) return false;
         buf_.alloc(size_);
-        memcpy(buf_.pData_, pData, buf_.size_);
+        std::memcpy(buf_.pData_, pData, buf_.size_);
         TiffHeade2 th;
         if (!th.read(buf_.pData_ + 10, 8)) return false;
         byteOrder_ = th.byteOrder();
@@ -267,7 +268,7 @@ namespace Exiv2 {
         if (size < size_) return false;
         if (0 != memcmp(pData, signature_, 9)) return false;
         buf_.alloc(size_);
-        memcpy(buf_.pData_, pData, buf_.size_);
+        std::memcpy(buf_.pData_, pData, buf_.size_);
         start_ = size_;
         return true;
 
@@ -296,7 +297,7 @@ namespace Exiv2 {
         if (   0 != memcmp(pData, signature1_, 8)
             && 0 != memcmp(pData, signature2_, 8)) return false;
         buf_.alloc(size_);
-        memcpy(buf_.pData_, pData, buf_.size_);
+        std::memcpy(buf_.pData_, pData, buf_.size_);
         start_ = size_;
         return true;
 
@@ -321,7 +322,7 @@ namespace Exiv2 {
         if (size < size_) return false;
         if (0 != memcmp(pData, signature_, size_)) return false;
         buf_.alloc(size_);
-        memcpy(buf_.pData_, pData, buf_.size_);
+        std::memcpy(buf_.pData_, pData, buf_.size_);
         start_ = size_;
         return true;
 
diff --git a/src/minoltamn.cpp b/src/minoltamn.cpp
index 4df463c..6bcf08f 100644
--- a/src/minoltamn.cpp
+++ b/src/minoltamn.cpp
@@ -44,6 +44,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <sstream>
 #include <iomanip>
 #include <cassert>
+#include <cstring>
 
 // *****************************************************************************
 // class member definitions
@@ -1434,7 +1435,7 @@ namespace Exiv2 {
     long MinoltaMakerNote::assemble(Entry& e, IfdId ifdId, uint16_t tag, ByteOrder /*byteOrder*/) const
     {
         DataBuf buf(1024);
-        memset(buf.pData_, 0x0, 1024);
+        std::memset(buf.pData_, 0x0, 1024);
         uint16_t len = 0;
         Entries::const_iterator end = entries_.end();
         for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
@@ -1442,7 +1443,7 @@ namespace Exiv2 {
                 uint16_t pos = i->tag() * 2;
                 uint16_t size = pos + static_cast<uint16_t>(i->size());
                 assert(size <= 1024);
-                memcpy(buf.pData_ + pos, i->data(), i->size());
+                std::memcpy(buf.pData_ + pos, i->data(), i->size());
                 if (len < size) len = size;
             }
         }
@@ -1459,7 +1460,7 @@ namespace Exiv2 {
     long MinoltaMakerNote::assembleStd(Entry& e, IfdId ifdId, uint32_t tag, ByteOrder /*byteOrder*/) const
     {
         DataBuf buf(1024);
-        memset(buf.pData_, 0x0, 1024);
+        std::memset(buf.pData_, 0x0, 1024);
         uint32_t len = 0;
         Entries::const_iterator end = entries_.end();
         for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
@@ -1467,7 +1468,7 @@ namespace Exiv2 {
                 uint32_t pos = i->tag() * 4;
                 uint32_t size = pos + static_cast<uint32_t>(i->size());
                 assert(size <= 1024);
-                memcpy(buf.pData_ + pos, i->data(), i->size());
+                std::memcpy(buf.pData_ + pos, i->data(), i->size());
                 if (len < size) len = size;
             }
         }
diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
index 6abfca2..895821d 100644
--- a/src/nikonmn.cpp
+++ b/src/nikonmn.cpp
@@ -503,7 +503,7 @@ namespace Exiv2 {
         if (len < 8) return 1;
 
         header_.alloc(8);
-        memcpy(header_.pData_, buf, header_.size_);
+        std::memcpy(header_.pData_, buf, header_.size_);
         start_ = 8;
         return 0;
     }
@@ -829,7 +829,7 @@ namespace Exiv2 {
         if (len < 18) return 1;
 
         header_.alloc(18);
-        memcpy(header_.pData_, buf, header_.size_);
+        std::memcpy(header_.pData_, buf, header_.size_);
         TiffHeader tiffHeader;
         tiffHeader.read(header_.pData_ + 10);
         byteOrder_ = tiffHeader.byteOrder();
diff --git a/src/olympusmn.cpp b/src/olympusmn.cpp
index 392bd4f..d89209f 100644
--- a/src/olympusmn.cpp
+++ b/src/olympusmn.cpp
@@ -45,6 +45,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <sstream>
 #include <iomanip>
 #include <cassert>
+#include <cstring>
 
 // *****************************************************************************
 // class member definitions
@@ -433,7 +434,7 @@ namespace Exiv2 {
 
         // Copy the header
         header_.alloc(8);
-        memcpy(header_.pData_, buf, header_.size_);
+        std::memcpy(header_.pData_, buf, header_.size_);
         // Adjust the offset of the IFD for the prefix
         start_ = 8;
         return 0;
diff --git a/src/panasonicmn.cpp b/src/panasonicmn.cpp
index c4084c7..d0c0c0b 100644
--- a/src/panasonicmn.cpp
+++ b/src/panasonicmn.cpp
@@ -43,6 +43,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <sstream>
 #include <iomanip>
 #include <cassert>
+#include <cstring>
 
 // *****************************************************************************
 // class member definitions
@@ -306,7 +307,7 @@ namespace Exiv2 {
         if (len < 12) return 1;
 
         header_.alloc(12);
-        memcpy(header_.pData_, buf, header_.size_);
+        std::memcpy(header_.pData_, buf, header_.size_);
         // Adjust the offset of the IFD for the prefix
         start_ = 12;
         return 0;
diff --git a/src/pngchunk.cpp b/src/pngchunk.cpp
index cfcb920..b1f4ee8 100644
--- a/src/pngchunk.cpp
+++ b/src/pngchunk.cpp
@@ -531,7 +531,7 @@ namespace Exiv2 {
         DDebug() << "Writing Raw profile: type=" << profile_type << ", length=" << length << endl;
         
         text               = (png_textp) png_malloc(ping, (png_uint_32) sizeof(png_text));
-        description_length = strlen((const char *) profile_type);
+        description_length = std::strlen((const char *) profile_type);
         allocated_length   = (png_uint_32) (length*2 + (length >> 5) + 20 + description_length);
         
         text[0].text   = (png_charp) png_malloc(ping, allocated_length);
diff --git a/src/sigmamn.cpp b/src/sigmamn.cpp
index 16a665a..f9d7a23 100644
--- a/src/sigmamn.cpp
+++ b/src/sigmamn.cpp
@@ -44,6 +44,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <sstream>
 #include <iomanip>
 #include <cassert>
+#include <cstring>
 
 // *****************************************************************************
 // class member definitions
@@ -166,7 +167,7 @@ namespace Exiv2 {
         // extra bytes (0x01, 0x00) between the ID string and the start of the
         // Makernote IFD. So we copy 10 bytes into the header.
         header_.alloc(10);
-        memcpy(header_.pData_, buf, header_.size_);
+        std::memcpy(header_.pData_, buf, header_.size_);
         // Adjust the offset of the IFD for the prefix
         start_ = 10;
         return 0;
diff --git a/src/sonymn.cpp b/src/sonymn.cpp
index 5ced2bd..34c2986 100644
--- a/src/sonymn.cpp
+++ b/src/sonymn.cpp
@@ -41,6 +41,7 @@ EXIV2_RCSID("@(#) $Id$")
 #include <sstream>
 #include <iomanip>
 #include <cassert>
+#include <cstring>
 
 // *****************************************************************************
 // class member definitions
@@ -117,7 +118,7 @@ namespace Exiv2 {
     {
         if (len < 12) return 1;
         header_.alloc(12);
-        memcpy(header_.pData_, buf, header_.size_);
+        std::memcpy(header_.pData_, buf, header_.size_);
         // Adjust the offset of the IFD for the prefix
         start_ = 12;
         return 0;
diff --git a/src/value.cpp b/src/value.cpp
index fae8398..6754b1d 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -699,7 +699,7 @@ namespace Exiv2 {
         }
         // Make the buffer a 0 terminated C-string for sscanf
         char b[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-        memcpy(b, reinterpret_cast<const char*>(buf), 8);
+        std::memcpy(b, reinterpret_cast<const char*>(buf), 8);
         int scanned = sscanf(b, "%4d%2d%2d",
                              &date_.year, &date_.month, &date_.day);
         if (scanned != 3) {
@@ -746,7 +746,7 @@ namespace Exiv2 {
         int wrote = sprintf(temp, "%04d%02d%02d",
                             date_.year, date_.month, date_.day);
         assert(wrote == 8);
-        memcpy(buf, temp, 8);
+        std::memcpy(buf, temp, 8);
         return 8;
     }
 
@@ -772,7 +772,7 @@ namespace Exiv2 {
         // Range of tm struct is limited to about 1970 to 2038
         // This will return -1 if outside that range
         std::tm tms;
-        memset(&tms, 0, sizeof(tms));
+        std::memset(&tms, 0, sizeof(tms));
         tms.tm_mday = date_.day;
         tms.tm_mon = date_.month - 1;
         tms.tm_year = date_.year - 1900;
@@ -802,7 +802,7 @@ namespace Exiv2 {
     {
         // Make the buffer a 0 terminated C-string for scanTime[36]
         char b[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-        memcpy(b, reinterpret_cast<const char*>(buf), (len < 12 ? len : 11));
+        std::memcpy(b, reinterpret_cast<const char*>(buf), (len < 12 ? len : 11));
         // Hard coded to read HHMMSS or Iptc style times
         int rc = 1;
         if (len == 6) {
@@ -881,7 +881,7 @@ namespace Exiv2 {
 
     void TimeValue::setTime( const Time& src )
     {
-        memcpy(&time_, &src, sizeof(time_));
+        std::memcpy(&time_, &src, sizeof(time_));
     }
 
     long TimeValue::copy(byte* buf, ByteOrder /*byteOrder*/) const
@@ -897,7 +897,7 @@ namespace Exiv2 {
                    plusMinus, abs(time_.tzHour), abs(time_.tzMinute));
 
         assert(wrote == 11);
-        memcpy(buf, temp, 11);
+        std::memcpy(buf, temp, 11);
         return 11;
     }
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list