diff --git a/config/config.mk.in b/config/config.mk.in index 9aba410d..d6156179 100644 --- a/config/config.mk.in +++ b/config/config.mk.in @@ -58,7 +58,7 @@ GXX = @GXX@ # Common compiler flags (warnings, symbols [-ggdb], optimization [-O2], etc) CXXFLAGS = @CXXFLAGS@ ifeq ($(GXX),yes) - CXXFLAGS += -Wall -Wcast-align -Wconversion -Wpointer-arith -Wformat-security -Wmissing-format-attribute -W + CXXFLAGS += -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -W endif # Command to run only the preprocessor diff --git a/src/actions.cpp b/src/actions.cpp index 6916e433..46ef427e 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -1125,10 +1125,10 @@ namespace Action { rc = insertThumbnail(path); } if ( rc == 0 - && Params::instance().target_ & Params::ctExif - || Params::instance().target_ & Params::ctIptc - || Params::instance().target_ & Params::ctComment - || Params::instance().target_ & Params::ctXmp) { + && ( Params::instance().target_ & Params::ctExif + || Params::instance().target_ & Params::ctIptc + || Params::instance().target_ & Params::ctComment + || Params::instance().target_ & Params::ctXmp)) { std::string suffix = Params::instance().suffix_; if (suffix.empty()) suffix = ".exv"; std::string exvPath = newFilePath(path, suffix); diff --git a/src/cr2image.cpp b/src/cr2image.cpp index 45fce433..2189fcdd 100644 --- a/src/cr2image.cpp +++ b/src/cr2image.cpp @@ -74,9 +74,9 @@ namespace Exiv2 { { "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc } }; - const DecoderFct Cr2Decoder::findDecoder(const std::string& make, - uint32_t extendedTag, - uint16_t group) + DecoderFct Cr2Decoder::findDecoder(const std::string& make, + uint32_t extendedTag, + uint16_t group) { DecoderFct decoderFct = &TiffMetadataDecoder::decodeStdTiffEntry; const TiffDecoderInfo* td = find(cr2DecoderInfo_, diff --git a/src/cr2image.hpp b/src/cr2image.hpp index f00ad6a3..9492d270 100644 --- a/src/cr2image.hpp +++ b/src/cr2image.hpp @@ -137,9 +137,9 @@ namespace Exiv2 { @return Pointer to the decoder function */ - static const DecoderFct findDecoder(const std::string& make, - uint32_t extendedTag, - uint16_t group); + static DecoderFct findDecoder(const std::string& make, + uint32_t extendedTag, + uint16_t group); private: static const TiffDecoderInfo cr2DecoderInfo_[]; //dataSize()); } if ( maxOffset > pIfd1_->offset() - || maxOffset > pIfd1_->dataOffset() && pIfd1_->dataOffset() > 0) + || (maxOffset > pIfd1_->dataOffset() && pIfd1_->dataOffset() > 0)) rc = false; /* Todo: Removed condition from the above if(). Should be re-added... diff --git a/src/sigmamn.cpp b/src/sigmamn.cpp index 257b654e..b619cf19 100644 --- a/src/sigmamn.cpp +++ b/src/sigmamn.cpp @@ -178,10 +178,10 @@ namespace Exiv2 { int rc = 0; // Check the SIGMA or FOVEON prefix if ( header_.size_ < 10 - || std::string(reinterpret_cast(header_.pData_), 8) + || ( std::string(reinterpret_cast(header_.pData_), 8) != std::string("SIGMA\0\0\0", 8) - && std::string(reinterpret_cast(header_.pData_), 8) - != std::string("FOVEON\0\0", 8)) { + && std::string(reinterpret_cast(header_.pData_), 8) + != std::string("FOVEON\0\0", 8))) { rc = 2; } return rc; diff --git a/src/tags.cpp b/src/tags.cpp index dec5ac5e..675f9462 100644 --- a/src/tags.cpp +++ b/src/tags.cpp @@ -1269,7 +1269,7 @@ namespace Exiv2 { const TagInfo* ExifTags::makerTagInfo(uint16_t tag, IfdId ifdId) { int i = 0; - for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i); + for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {} if (i == MAX_MAKER_TAG_INFOS) return 0; for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) { @@ -1283,7 +1283,7 @@ namespace Exiv2 { IfdId ifdId) { int i = 0; - for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i); + for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {} if (i == MAX_MAKER_TAG_INFOS) return 0; for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) { @@ -1298,7 +1298,7 @@ namespace Exiv2 { bool ExifTags::isMakerIfd(IfdId ifdId) { int i = 0; - for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i); + for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {} return i != MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != IfdId(0); } @@ -1491,7 +1491,7 @@ namespace Exiv2 { void ExifTags::makerTaglist(std::ostream& os, IfdId ifdId) { int i = 0; - for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i); + for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {} if (i != MAX_MAKER_TAG_INFOS) { const TagInfo* mnTagInfo = makerTagInfos_[i]; for (int k=0; mnTagInfo[k].tag_ != 0xffff; ++k) { diff --git a/src/tifffwd.hpp b/src/tifffwd.hpp index 051fe604..753b5daf 100644 --- a/src/tifffwd.hpp +++ b/src/tifffwd.hpp @@ -81,9 +81,9 @@ namespace Exiv2 { /*! @brief Type for a function pointer for a function to decode a TIFF component. */ - typedef const DecoderFct (*FindDecoderFct)(const std::string& make, - uint32_t extendedTag, - uint16_t group); + typedef DecoderFct (*FindDecoderFct)(const std::string& make, + uint32_t extendedTag, + uint16_t group); /*! @brief Type for a function pointer for a function to create a TIFF component. Use TiffComponent::AutoPtr, it is not used in this declaration only diff --git a/src/tiffparser.cpp b/src/tiffparser.cpp index e1c9f092..24d3794e 100644 --- a/src/tiffparser.cpp +++ b/src/tiffparser.cpp @@ -148,9 +148,9 @@ namespace Exiv2 { { "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc } }; - const DecoderFct TiffDecoder::findDecoder(const std::string& make, - uint32_t extendedTag, - uint16_t group) + DecoderFct TiffDecoder::findDecoder(const std::string& make, + uint32_t extendedTag, + uint16_t group) { DecoderFct decoderFct = &TiffMetadataDecoder::decodeStdTiffEntry; const TiffDecoderInfo* td = find(tiffDecoderInfo_, diff --git a/src/tiffparser.hpp b/src/tiffparser.hpp index 39f21bfb..4d90bdb6 100644 --- a/src/tiffparser.hpp +++ b/src/tiffparser.hpp @@ -118,9 +118,9 @@ namespace Exiv2 { @return Pointer to the decoder function */ - static const DecoderFct findDecoder(const std::string& make, - uint32_t extendedTag, - uint16_t group); + static DecoderFct findDecoder(const std::string& make, + uint32_t extendedTag, + uint16_t group); private: static const TiffDecoderInfo tiffDecoderInfo_[]; // #include +#include #if XMP_MacBuild #include