[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:36:25 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=4cbecc7
The following commit has been merged in the master branch:
commit 4cbecc7a47e1ec70543b92c9ae78b4f430bde42a
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Tue Jun 1 11:13:18 2004 +0000
Fixed MSVC errors and warnings (Steve, sking_2.patch, parts thereof)
---
src/image.cpp | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/src/image.cpp b/src/image.cpp
index dc46017..3224cc3 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -20,14 +20,14 @@
*/
/*
File: image.cpp
- Version: $Name: $ $Revision: 1.14 $
+ Version: $Name: $ $Revision: 1.15 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 26-Jan-04, ahu: created
11-Feb-04, ahu: isolated as a component
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.14 $ $RCSfile: image.cpp,v $")
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.15 $ $RCSfile: image.cpp,v $")
// *****************************************************************************
// included header files
@@ -38,9 +38,7 @@ EXIV2_RCSID("@(#) $Name: $ $Revision: 1.14 $ $RCSfile: image.cpp,v $")
#include <iostream>
#include <fstream>
#include <cstring>
-#include <cstdio> // for rename, remove
-#include <sys/types.h> // for getpid
-#include <unistd.h> // for getpid
+#include <cstdio> // for rename, remove, tmpnam
// *****************************************************************************
// class member definitions
@@ -194,8 +192,7 @@ namespace Exiv2 {
if (!is) return -1;
// Write the output to a temporary file
- pid_t pid = getpid();
- std::string tmpname = path + toString(pid);
+ std::string tmpname = tmpnam(NULL);
std::ofstream os(tmpname.c_str(), std::ios::binary);
if (!os) return -3;
@@ -261,10 +258,10 @@ namespace Exiv2 {
us2Data(tmpbuf, soi_, bigEndian);
us2Data(tmpbuf + 2, app0_, bigEndian);
if (jfif.pData_) {
- us2Data(tmpbuf + 4, 7 + jfif.size_, bigEndian);
+ us2Data(tmpbuf + 4, static_cast<uint16>(7 + jfif.size_), bigEndian);
}
else {
- us2Data(tmpbuf + 4, 7 + defaultJfifSize, bigEndian);
+ us2Data(tmpbuf + 4, static_cast<uint16>(7 + defaultJfifSize), bigEndian);
}
memcpy(tmpbuf + 6, jfifId_, 5);
os.write(tmpbuf, 11);
@@ -292,8 +289,7 @@ namespace Exiv2 {
if (!is) return -1;
// Write the output to a temporary file
- pid_t pid = getpid();
- std::string tmpname = path + toString(pid);
+ std::string tmpname = tmpnam(NULL);
std::ofstream os(tmpname.c_str(), std::ios::binary);
if (!os) return -3;
@@ -365,7 +361,7 @@ namespace Exiv2 {
if (jfif.pData_) {
// Write APP0 marker, size of APP0 field and JFIF data
us2Data(tmpbuf, app0_, bigEndian);
- us2Data(tmpbuf + 2, 7 + jfif.size_, bigEndian);
+ us2Data(tmpbuf + 2, static_cast<uint16>(7 + jfif.size_), bigEndian);
memcpy(tmpbuf + 4, jfifId_, 5);
os.write(tmpbuf, 9);
os.write(jfif.pData_, jfif.size_);
@@ -375,7 +371,7 @@ namespace Exiv2 {
}
// Write APP1 marker, size of APP1 field, Exif id and Exif data
us2Data(tmpbuf, app1_, bigEndian);
- us2Data(tmpbuf + 2, sizeExifData_ + 8, bigEndian);
+ us2Data(tmpbuf + 2, static_cast<uint16>(sizeExifData_ + 8), bigEndian);
memcpy(tmpbuf + 4, exifId_, 6);
os.write(tmpbuf, 10);
os.write(pExifData_, sizeExifData_);
@@ -566,7 +562,7 @@ namespace Exiv2 {
// Write APP1 marker, size of APP1 field, Exif id and Exif data
char tmpbuf[10];
us2Data(tmpbuf, app1_, bigEndian);
- us2Data(tmpbuf + 2, sizeExifData_ + 8, bigEndian);
+ us2Data(tmpbuf + 2, static_cast<uint16>(sizeExifData_ + 8), bigEndian);
memcpy(tmpbuf + 4, exifId_, 6);
os.write(tmpbuf, 10);
os.write(pExifData_, sizeExifData_);
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list