Fix two coverity issues
This commit is contained in:
parent
50936b2447
commit
3824213e49
@ -1058,8 +1058,8 @@ cmsHPROFILE rtengine::ICCStore::makeStdGammaProfile(cmsHPROFILE iprof)
|
|||||||
uint32_t size;
|
uint32_t size;
|
||||||
} tags[tag_count];
|
} tags[tag_count];
|
||||||
|
|
||||||
const uint32_t gamma = 0x239;
|
constexpr uint32_t gamma = 0x239;
|
||||||
int gamma_size = 14;
|
constexpr int gamma_size = 14;
|
||||||
int data_size = (gamma_size + 3) & ~3;
|
int data_size = (gamma_size + 3) & ~3;
|
||||||
|
|
||||||
for (uint32_t i = 0; i < tag_count; i++) {
|
for (uint32_t i = 0; i < tag_count; i++) {
|
||||||
@ -1096,13 +1096,13 @@ cmsHPROFILE rtengine::ICCStore::makeStdGammaProfile(cmsHPROFILE iprof)
|
|||||||
tags[i].sig == 0x6B545243) { // kTRC
|
tags[i].sig == 0x6B545243) { // kTRC
|
||||||
if (gamma_offset == 0) {
|
if (gamma_offset == 0) {
|
||||||
gamma_offset = offset;
|
gamma_offset = offset;
|
||||||
uint32_t pcurve[] = { htonl(0x63757276), htonl(0), htonl(gamma_size == 12 ? 0U : 1U) };
|
uint32_t pcurve[] = { htonl(0x63757276), htonl(0), htonl(/*gamma_size == 12 ? 0U : */1U) };
|
||||||
memcpy(&nd[offset], pcurve, 12);
|
memcpy(&nd[offset], pcurve, 12);
|
||||||
|
|
||||||
if (gamma_size == 14) {
|
//if (gamma_size == 14) {
|
||||||
uint16_t gm = htons(gamma);
|
uint16_t gm = htons(gamma);
|
||||||
memcpy(&nd[offset + 12], &gm, 2);
|
memcpy(&nd[offset + 12], &gm, 2);
|
||||||
}
|
//}
|
||||||
|
|
||||||
offset += (gamma_size + 3) & ~3;
|
offset += (gamma_size + 3) & ~3;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,8 @@ private:
|
|||||||
PDAFLinesFilter::PDAFLinesFilter(RawImage *ri):
|
PDAFLinesFilter::PDAFLinesFilter(RawImage *ri):
|
||||||
ri_(ri),
|
ri_(ri),
|
||||||
W_(ri->get_width()),
|
W_(ri->get_width()),
|
||||||
H_(ri->get_height())
|
H_(ri->get_height()),
|
||||||
|
offset_(0)
|
||||||
{
|
{
|
||||||
gthresh_ = new PDAFGreenEqulibrateThreshold(W_, H_);
|
gthresh_ = new PDAFGreenEqulibrateThreshold(W_, H_);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user