aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-05-30 21:04:29 +0200
committerOlivier Tilloy <olivier@tilloy.net>2010-05-30 21:04:29 +0200
commit9b4aba6e0be03c8b916fed1df82207bcaa34e529 (patch)
treeda143d516b635d5cc1b25621d6a78c2ec406260a
parent3df489e203e3e1c85b275c279d53412062118f52 (diff)
downloadpyexiv2-9b4aba6e0be03c8b916fed1df82207bcaa34e529.tar.gz
Fixed some harmless compilation warnings
(thanks to Rob Healey for pointing them out).
-rw-r--r--src/exiv2wrapper.cpp8
-rw-r--r--src/exiv2wrapper.hpp2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index 935330a..e29569d 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -90,7 +90,7 @@ Image::Image(const std::string& filename)
}
// From buffer constructor
-Image::Image(const std::string& buffer, long size)
+Image::Image(const std::string& buffer, unsigned long size)
{
// Deep copy of the data buffer
_data = new Exiv2::byte[size];
@@ -398,7 +398,7 @@ std::string Image::getDataBuffer() const
Py_BEGIN_ALLOW_THREADS
Exiv2::BasicIo& io = _image->io();
- long size = io.size();
+ unsigned long size = io.size();
long pos = -1;
if (io.isopen())
@@ -822,6 +822,10 @@ void XmpTag::setParentImage(Image& image)
setLangAltValue(value);
break;
}
+ default:
+ // Should not happen, this case is here for the sake
+ // of completeness and to avoid compiler warnings.
+ assert(0);
}
}
diff --git a/src/exiv2wrapper.hpp b/src/exiv2wrapper.hpp
index a0c876b..5abf07d 100644
--- a/src/exiv2wrapper.hpp
+++ b/src/exiv2wrapper.hpp
@@ -164,7 +164,7 @@ class Image
public:
// Constructors
Image(const std::string& filename);
- Image(const std::string& buffer, long size);
+ Image(const std::string& buffer, unsigned long size);
Image(const Image& image);
~Image();