Bug #547 » exiv2_r1401-1402.patch
| config/config.mk.in (revision 1402) | ||
|---|---|---|
| 58 | 58 |
# Common compiler flags (warnings, symbols [-ggdb], optimization [-O2], etc) |
| 59 | 59 |
CXXFLAGS = @CXXFLAGS@ |
| 60 | 60 |
ifeq ($(GXX),yes) |
| 61 |
CXXFLAGS += -Wall -Wcast-align -Wconversion -Wpointer-arith -Wformat-security -Wmissing-format-attribute -W
|
|
| 61 |
CXXFLAGS += -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -W |
|
| 62 | 62 |
endif |
| 63 | 63 | |
| 64 | 64 |
# Command to run only the preprocessor |
| xmpsdk/src/XMPCore_Impl.hpp (revision 1402) | ||
|---|---|---|
| 24 | 24 |
#include <map> |
| 25 | 25 | |
| 26 | 26 |
#include <cassert> |
| 27 |
#include <cstring> |
|
| 27 | 28 | |
| 28 | 29 |
#if XMP_MacBuild |
| 29 | 30 |
#include <Multiprocessing.h> |
| src/tiffparser.cpp (revision 1402) | ||
|---|---|---|
| 148 | 148 |
{ "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc }
|
| 149 | 149 |
}; |
| 150 | 150 | |
| 151 |
const DecoderFct TiffDecoder::findDecoder(const std::string& make,
|
|
| 152 |
uint32_t extendedTag,
|
|
| 153 |
uint16_t group)
|
|
| 151 |
DecoderFct TiffDecoder::findDecoder(const std::string& make, |
|
| 152 |
uint32_t extendedTag, |
|
| 153 |
uint16_t group) |
|
| 154 | 154 |
{
|
| 155 | 155 |
DecoderFct decoderFct = &TiffMetadataDecoder::decodeStdTiffEntry; |
| 156 | 156 |
const TiffDecoderInfo* td = find(tiffDecoderInfo_, |
| src/exif.cpp (revision 1402) | ||
|---|---|---|
| 959 | 959 |
+ pGpsIfd_->dataSize()); |
| 960 | 960 |
} |
| 961 | 961 |
if ( maxOffset > pIfd1_->offset() |
| 962 |
|| maxOffset > pIfd1_->dataOffset() && pIfd1_->dataOffset() > 0)
|
|
| 962 |
|| (maxOffset > pIfd1_->dataOffset() && pIfd1_->dataOffset() > 0))
|
|
| 963 | 963 |
rc = false; |
| 964 | 964 |
/* |
| 965 | 965 |
Todo: Removed condition from the above if(). Should be re-added... |
| src/cr2image.hpp (revision 1402) | ||
|---|---|---|
| 137 | 137 | |
| 138 | 138 |
@return Pointer to the decoder function |
| 139 | 139 |
*/ |
| 140 |
static const DecoderFct findDecoder(const std::string& make,
|
|
| 141 |
uint32_t extendedTag,
|
|
| 142 |
uint16_t group);
|
|
| 140 |
static DecoderFct findDecoder(const std::string& make, |
|
| 141 |
uint32_t extendedTag, |
|
| 142 |
uint16_t group); |
|
| 143 | 143 | |
| 144 | 144 |
private: |
| 145 | 145 |
static const TiffDecoderInfo cr2DecoderInfo_[]; //<! CR2 decoder table |
| src/tags.cpp (revision 1402) | ||
|---|---|---|
| 1269 | 1269 |
const TagInfo* ExifTags::makerTagInfo(uint16_t tag, IfdId ifdId) |
| 1270 | 1270 |
{
|
| 1271 | 1271 |
int i = 0; |
| 1272 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i);
|
|
| 1272 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {}
|
|
| 1273 | 1273 |
if (i == MAX_MAKER_TAG_INFOS) return 0; |
| 1274 | 1274 | |
| 1275 | 1275 |
for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) {
|
| ... | ... | |
| 1283 | 1283 |
IfdId ifdId) |
| 1284 | 1284 |
{
|
| 1285 | 1285 |
int i = 0; |
| 1286 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i);
|
|
| 1286 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {}
|
|
| 1287 | 1287 |
if (i == MAX_MAKER_TAG_INFOS) return 0; |
| 1288 | 1288 | |
| 1289 | 1289 |
for (int k = 0; makerTagInfos_[i][k].tag_ != 0xffff; ++k) {
|
| ... | ... | |
| 1298 | 1298 |
bool ExifTags::isMakerIfd(IfdId ifdId) |
| 1299 | 1299 |
{
|
| 1300 | 1300 |
int i = 0; |
| 1301 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i);
|
|
| 1301 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {}
|
|
| 1302 | 1302 |
return i != MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != IfdId(0); |
| 1303 | 1303 |
} |
| 1304 | 1304 | |
| ... | ... | |
| 1491 | 1491 |
void ExifTags::makerTaglist(std::ostream& os, IfdId ifdId) |
| 1492 | 1492 |
{
|
| 1493 | 1493 |
int i = 0; |
| 1494 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i);
|
|
| 1494 |
for (; i < MAX_MAKER_TAG_INFOS && makerIfdIds_[i] != ifdId; ++i) {}
|
|
| 1495 | 1495 |
if (i != MAX_MAKER_TAG_INFOS) {
|
| 1496 | 1496 |
const TagInfo* mnTagInfo = makerTagInfos_[i]; |
| 1497 | 1497 |
for (int k=0; mnTagInfo[k].tag_ != 0xffff; ++k) {
|
| src/tiffparser.hpp (revision 1402) | ||
|---|---|---|
| 118 | 118 | |
| 119 | 119 |
@return Pointer to the decoder function |
| 120 | 120 |
*/ |
| 121 |
static const DecoderFct findDecoder(const std::string& make,
|
|
| 122 |
uint32_t extendedTag,
|
|
| 123 |
uint16_t group);
|
|
| 121 |
static DecoderFct findDecoder(const std::string& make, |
|
| 122 |
uint32_t extendedTag, |
|
| 123 |
uint16_t group); |
|
| 124 | 124 | |
| 125 | 125 |
private: |
| 126 | 126 |
static const TiffDecoderInfo tiffDecoderInfo_[]; //<! TIFF decoder table |
| src/cr2image.cpp (revision 1402) | ||
|---|---|---|
| 74 | 74 |
{ "*", 0x8649, Group::ifd0, &TiffMetadataDecoder::decodeIptc }
|
| 75 | 75 |
}; |
| 76 | 76 | |
| 77 |
const DecoderFct Cr2Decoder::findDecoder(const std::string& make,
|
|
| 78 |
uint32_t extendedTag,
|
|
| 79 |
uint16_t group)
|
|
| 77 |
DecoderFct Cr2Decoder::findDecoder(const std::string& make, |
|
| 78 |
uint32_t extendedTag, |
|
| 79 |
uint16_t group) |
|
| 80 | 80 |
{
|
| 81 | 81 |
DecoderFct decoderFct = &TiffMetadataDecoder::decodeStdTiffEntry; |
| 82 | 82 |
const TiffDecoderInfo* td = find(cr2DecoderInfo_, |
| src/tifffwd.hpp (revision 1402) | ||
|---|---|---|
| 81 | 81 |
/*! |
| 82 | 82 |
@brief Type for a function pointer for a function to decode a TIFF component. |
| 83 | 83 |
*/ |
| 84 |
typedef const DecoderFct (*FindDecoderFct)(const std::string& make,
|
|
| 85 |
uint32_t extendedTag,
|
|
| 86 |
uint16_t group);
|
|
| 84 |
typedef DecoderFct (*FindDecoderFct)(const std::string& make, |
|
| 85 |
uint32_t extendedTag, |
|
| 86 |
uint16_t group); |
|
| 87 | 87 |
/*! |
| 88 | 88 |
@brief Type for a function pointer for a function to create a TIFF component. |
| 89 | 89 |
Use TiffComponent::AutoPtr, it is not used in this declaration only |
| src/actions.cpp (revision 1402) | ||
|---|---|---|
| 1125 | 1125 |
rc = insertThumbnail(path); |
| 1126 | 1126 |
} |
| 1127 | 1127 |
if ( rc == 0 |
| 1128 |
&& Params::instance().target_ & Params::ctExif |
|
| 1129 |
|| Params::instance().target_ & Params::ctIptc |
|
| 1130 |
|| Params::instance().target_ & Params::ctComment |
|
| 1131 |
|| Params::instance().target_ & Params::ctXmp) {
|
|
| 1128 |
&& ( Params::instance().target_ & Params::ctExif
|
|
| 1129 |
|| Params::instance().target_ & Params::ctIptc
|
|
| 1130 |
|| Params::instance().target_ & Params::ctComment
|
|
| 1131 |
|| Params::instance().target_ & Params::ctXmp)) {
|
|
| 1132 | 1132 |
std::string suffix = Params::instance().suffix_; |
| 1133 | 1133 |
if (suffix.empty()) suffix = ".exv"; |
| 1134 | 1134 |
std::string exvPath = newFilePath(path, suffix); |
| src/sigmamn.cpp (revision 1402) | ||
|---|---|---|
| 178 | 178 |
int rc = 0; |
| 179 | 179 |
// Check the SIGMA or FOVEON prefix |
| 180 | 180 |
if ( header_.size_ < 10 |
| 181 |
|| std::string(reinterpret_cast<char*>(header_.pData_), 8) |
|
| 181 |
|| ( std::string(reinterpret_cast<char*>(header_.pData_), 8)
|
|
| 182 | 182 |
!= std::string("SIGMA\0\0\0", 8)
|
| 183 |
&& std::string(reinterpret_cast<char*>(header_.pData_), 8) |
|
| 184 |
!= std::string("FOVEON\0\0", 8)) {
|
|
| 183 |
&& std::string(reinterpret_cast<char*>(header_.pData_), 8)
|
|
| 184 |
!= std::string("FOVEON\0\0", 8))) {
|
|
| 185 | 185 |
rc = 2; |
| 186 | 186 |
} |
| 187 | 187 |
return rc; |