Fixed g++-4.3 errors and warnings.

v0.27.3
Andreas Huggel 17 years ago
parent 38be96fe2a
commit 81ff0d6a7c

@ -58,7 +58,7 @@ GXX = @GXX@
# Common compiler flags (warnings, symbols [-ggdb], optimization [-O2], etc) # Common compiler flags (warnings, symbols [-ggdb], optimization [-O2], etc)
CXXFLAGS = @CXXFLAGS@ CXXFLAGS = @CXXFLAGS@
ifeq ($(GXX),yes) 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 endif
# Command to run only the preprocessor # Command to run only the preprocessor

@ -1125,10 +1125,10 @@ namespace Action {
rc = insertThumbnail(path); rc = insertThumbnail(path);
} }
if ( rc == 0 if ( rc == 0
&& Params::instance().target_ & Params::ctExif && ( Params::instance().target_ & Params::ctExif
|| Params::instance().target_ & Params::ctIptc || Params::instance().target_ & Params::ctIptc
|| Params::instance().target_ & Params::ctComment || Params::instance().target_ & Params::ctComment
|| Params::instance().target_ & Params::ctXmp) { || Params::instance().target_ & Params::ctXmp)) {
std::string suffix = Params::instance().suffix_; std::string suffix = Params::instance().suffix_;
if (suffix.empty()) suffix = ".exv"; if (suffix.empty()) suffix = ".exv";
std::string exvPath = newFilePath(path, suffix); std::string exvPath = newFilePath(path, suffix);

@ -74,7 +74,7 @@ namespace Exiv2 {
{ "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc } { "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc }
}; };
const DecoderFct Cr2Decoder::findDecoder(const std::string& make, DecoderFct Cr2Decoder::findDecoder(const std::string& make,
uint32_t extendedTag, uint32_t extendedTag,
uint16_t group) uint16_t group)
{ {

@ -137,7 +137,7 @@ namespace Exiv2 {
@return Pointer to the decoder function @return Pointer to the decoder function
*/ */
static const DecoderFct findDecoder(const std::string& make, static DecoderFct findDecoder(const std::string& make,
uint32_t extendedTag, uint32_t extendedTag,
uint16_t group); uint16_t group);

@ -959,7 +959,7 @@ namespace Exiv2 {
+ pGpsIfd_->dataSize()); + pGpsIfd_->dataSize());
} }
if ( maxOffset > pIfd1_->offset() if ( maxOffset > pIfd1_->offset()
|| maxOffset > pIfd1_->dataOffset() && pIfd1_->dataOffset() > 0) || (maxOffset > pIfd1_->dataOffset() && pIfd1_->dataOffset() > 0))
rc = false; rc = false;
/* /*
Todo: Removed condition from the above if(). Should be re-added... Todo: Removed condition from the above if(). Should be re-added...

@ -178,10 +178,10 @@ namespace Exiv2 {
int rc = 0; int rc = 0;
// Check the SIGMA or FOVEON prefix // Check the SIGMA or FOVEON prefix
if ( header_.size_ < 10 if ( header_.size_ < 10
|| std::string(reinterpret_cast<char*>(header_.pData_), 8) || ( std::string(reinterpret_cast<char*>(header_.pData_), 8)
!= std::string("SIGMA\0\0\0", 8) != std::string("SIGMA\0\0\0", 8)
&& std::string(reinterpret_cast<char*>(header_.pData_), 8) && std::string(reinterpret_cast<char*>(header_.pData_), 8)
!= std::string("FOVEON\0\0", 8)) { != std::string("FOVEON\0\0", 8))) {
rc = 2; rc = 2;
} }
return rc; return rc;

@ -1269,7 +1269,7 @@ namespace Exiv2 {
const TagInfo* ExifTags::makerTagInfo(uint16_t tag, IfdId ifdId) const TagInfo* ExifTags::makerTagInfo(uint16_t tag, IfdId ifdId)
{ {
int i = 0; 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; if (i == MAX_MAKER_TAG_INFOS) return 0;
for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) { for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) {
@ -1283,7 +1283,7 @@ namespace Exiv2 {
IfdId ifdId) IfdId ifdId)
{ {
int i = 0; 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; if (i == MAX_MAKER_TAG_INFOS) return 0;
for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) { for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) {
@ -1298,7 +1298,7 @@ namespace Exiv2 {
bool ExifTags::isMakerIfd(IfdId ifdId) bool ExifTags::isMakerIfd(IfdId ifdId)
{ {
int i = 0; 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); return i != MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != IfdId(0);
} }
@ -1491,7 +1491,7 @@ namespace Exiv2 {
void ExifTags::makerTaglist(std::ostream& os, IfdId ifdId) void ExifTags::makerTaglist(std::ostream& os, IfdId ifdId)
{ {
int i = 0; 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) { if (i != MAX_MAKER_TAG_INFOS) {
const TagInfo* mnTagInfo = makerTagInfos_[i]; const TagInfo* mnTagInfo = makerTagInfos_[i];
for (int k=0; mnTagInfo[k].tag_ != 0xffff; ++k) { for (int k=0; mnTagInfo[k].tag_ != 0xffff; ++k) {

@ -81,7 +81,7 @@ namespace Exiv2 {
/*! /*!
@brief Type for a function pointer for a function to decode a TIFF component. @brief Type for a function pointer for a function to decode a TIFF component.
*/ */
typedef const DecoderFct (*FindDecoderFct)(const std::string& make, typedef DecoderFct (*FindDecoderFct)(const std::string& make,
uint32_t extendedTag, uint32_t extendedTag,
uint16_t group); uint16_t group);
/*! /*!

@ -148,7 +148,7 @@ namespace Exiv2 {
{ "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc } { "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc }
}; };
const DecoderFct TiffDecoder::findDecoder(const std::string& make, DecoderFct TiffDecoder::findDecoder(const std::string& make,
uint32_t extendedTag, uint32_t extendedTag,
uint16_t group) uint16_t group)
{ {

@ -118,7 +118,7 @@ namespace Exiv2 {
@return Pointer to the decoder function @return Pointer to the decoder function
*/ */
static const DecoderFct findDecoder(const std::string& make, static DecoderFct findDecoder(const std::string& make,
uint32_t extendedTag, uint32_t extendedTag,
uint16_t group); uint16_t group);

@ -24,6 +24,7 @@
#include <map> #include <map>
#include <cassert> #include <cassert>
#include <cstring>
#if XMP_MacBuild #if XMP_MacBuild
#include <Multiprocessing.h> #include <Multiprocessing.h>

Loading…
Cancel
Save