From a57317f6857ed0caf5c72961ceec5a8c77ce8081 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Mon, 8 Jun 2015 14:39:59 +0000 Subject: [PATCH] Some API policing --- include/exiv2/exiv2.hpp | 2 -- include/exiv2/futils.hpp | 2 -- include/exiv2/types.hpp | 2 +- samples/geotag.cpp | 2 ++ src/cr2image.cpp | 1 - src/image.cpp | 2 +- src/orfimage.cpp | 1 - src/tiffimage.cpp | 2 -- src/tiffvisitor.cpp | 1 - 9 files changed, 4 insertions(+), 11 deletions(-) diff --git a/include/exiv2/exiv2.hpp b/include/exiv2/exiv2.hpp index c73b307b..60b0080a 100644 --- a/include/exiv2/exiv2.hpp +++ b/include/exiv2/exiv2.hpp @@ -68,6 +68,4 @@ #include "xmp.hpp" #include "xmpsidecar.hpp" -#include - #endif // #ifndef EXIV2_HPP_ diff --git a/include/exiv2/futils.hpp b/include/exiv2/futils.hpp index d1117a80..e0959911 100644 --- a/include/exiv2/futils.hpp +++ b/include/exiv2/futils.hpp @@ -35,8 +35,6 @@ #include "config.h" #include "types.hpp" -#define UNUSED(x) (void)(x) - #ifdef EXV_HAVE_STDINT_H # include // for uint8_t #endif diff --git a/include/exiv2/types.hpp b/include/exiv2/types.hpp index c0c636c0..32efbd6a 100644 --- a/include/exiv2/types.hpp +++ b/include/exiv2/types.hpp @@ -96,7 +96,7 @@ namespace Exiv2 { typedef std::pair Rational; //! Type to express the byte order (little or big endian) - enum ByteOrder { invalidByteOrder, littleEndian, bigEndian,asciiBytes }; + enum ByteOrder { invalidByteOrder, littleEndian, bigEndian }; //! Type to indicate write method used by TIFF parsers enum WriteMethod { wmIntrusive, wmNonIntrusive }; diff --git a/samples/geotag.cpp b/samples/geotag.cpp index 4d25f1ab..df1107fd 100644 --- a/samples/geotag.cpp +++ b/samples/geotag.cpp @@ -58,6 +58,8 @@ char* realpath(const char* file,char* path); #define _MAX_PATH 1024 #endif +#define UNUSED(x) (void)(x) + // prototypes class Options; int getFileType(const char* path ,Options& options); diff --git a/src/cr2image.cpp b/src/cr2image.cpp index 4432cc63..8dc42507 100644 --- a/src/cr2image.cpp +++ b/src/cr2image.cpp @@ -275,7 +275,6 @@ namespace Exiv2 { buf.pData_[0] = 0x4d; buf.pData_[1] = 0x4d; break; - case asciiBytes: case invalidByteOrder: assert(false); break; diff --git a/src/image.cpp b/src/image.cpp index e443da7d..27843e18 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -446,7 +446,7 @@ namespace Exiv2 { return BasicIo::AutoPtr(new FileIo(path)); - UNUSED(useCurl); + (void)(useCurl); } // ImageFactory::createIo #ifdef EXV_UNICODE_PATH diff --git a/src/orfimage.cpp b/src/orfimage.cpp index f34473da..fc709714 100644 --- a/src/orfimage.cpp +++ b/src/orfimage.cpp @@ -272,7 +272,6 @@ namespace Exiv2 { buf.pData_[0] = 0x4d; buf.pData_[1] = 0x4d; break; - case asciiBytes: case invalidByteOrder: assert(false); break; diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index cb848b22..a7708c84 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -2292,7 +2292,6 @@ namespace Exiv2 { buf.pData_[0] = 0x4d; buf.pData_[1] = 0x4d; break; - case asciiBytes: case invalidByteOrder: assert(false); break; @@ -2313,7 +2312,6 @@ namespace Exiv2 { switch (byteOrder_) { case littleEndian: os << ", " << _("little endian encoded"); break; case bigEndian: os << ", " << _("big endian encoded"); break; - case asciiBytes: os << ", " << _("ascii bytes"); break; case invalidByteOrder: break; } os << "\n"; diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp index e9e7a33c..e3e23d99 100644 --- a/src/tiffvisitor.cpp +++ b/src/tiffvisitor.cpp @@ -358,7 +358,6 @@ namespace Exiv2 { case bigEndian: exifData_["Exif.MakerNote.ByteOrder"] = "MM"; break; - case asciiBytes: case invalidByteOrder: assert(object->byteOrder() != invalidByteOrder); break;