aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Kortstiege <mkortstiege@users.noreply.github.com>2015-07-08 18:51:17 +0200
committerMatthias Kortstiege <mkortstiege@users.noreply.github.com>2015-07-08 18:51:17 +0200
commitcb1eb1d6ce60f721c11b7ca504b7b8498dc6f732 (patch)
tree47a01a1e0d09b3ed2649f885f01ffc90438c65d1 /lib
parent92c64e581557dd4cfc2760183ed9bb31e8f90001 (diff)
parent1d20f7426a60ca6a88ac51a0f1ad4489e89af9b5 (diff)
Merge pull request #7451 from olafhering/master
various compiler warnings
Diffstat (limited to 'lib')
-rw-r--r--lib/cximage-6.0/CxImage/ximadsp.cpp7
-rw-r--r--lib/cximage-6.0/CxImage/ximaenc.cpp2
-rw-r--r--lib/cximage-6.0/raw/libdcr.c8
3 files changed, 11 insertions, 6 deletions
diff --git a/lib/cximage-6.0/CxImage/ximadsp.cpp b/lib/cximage-6.0/CxImage/ximadsp.cpp
index fd13446b0e..8425bb2f8d 100644
--- a/lib/cximage-6.0/CxImage/ximadsp.cpp
+++ b/lib/cximage-6.0/CxImage/ximadsp.cpp
@@ -2794,7 +2794,8 @@ bool CxImage::Lut(BYTE* pLut)
// faster loop for full image
BYTE *iSrc=info.pImage;
for(unsigned long i=0; i < head.biSizeImage ; i++){
- *iSrc++ = pLut[*iSrc];
+ *iSrc = pLut[*iSrc];
+ iSrc++;
}
return true;
}
@@ -3334,7 +3335,7 @@ int CxImage::OptimalThreshold(long method, RECT * pBox, CxImage* pContrastMask)
//max entropy
L = 0;
for (k=gray_min;k<=i;k++) if (p[k] > 0) L -= p[k]*log(p[k]/w1)/w1;
- for (k;k<=gray_max;k++) if (p[k] > 0) L -= p[k]*log(p[k]/w2)/w2;
+ for (;k<=gray_max;k++) if (p[k] > 0) L -= p[k]*log(p[k]/w2)/w2;
if (L3max < L || th3<0){
L3max = L;
th3 = i;
@@ -3347,7 +3348,7 @@ int CxImage::OptimalThreshold(long method, RECT * pBox, CxImage* pContrastMask)
for (k=gray_min;k<=i;k++)
vdiff += p[k]*(i-k)*(i-k);
double vsum = vdiff;
- for (k;k<=gray_max;k++){
+ for (;k<=gray_max;k++){
double dv = p[k]*(k-i)*(k-i);
vdiff -= dv;
vsum += dv;
diff --git a/lib/cximage-6.0/CxImage/ximaenc.cpp b/lib/cximage-6.0/CxImage/ximaenc.cpp
index ed8b7799a7..63e18f923c 100644
--- a/lib/cximage-6.0/CxImage/ximaenc.cpp
+++ b/lib/cximage-6.0/CxImage/ximaenc.cpp
@@ -1123,7 +1123,7 @@ bool CxImage::CheckFormat(CxFile * hFile, DWORD imagetype)
////////////////////////////////////////////////////////////////////////////////
bool CxImage::CheckFormat(BYTE * buffer, DWORD size, DWORD imagetype)
{
- if (buffer==NULL || size==NULL){
+ if (buffer==NULL || size==0){
strcpy(info.szLastError,"invalid or empty buffer");
return false;
}
diff --git a/lib/cximage-6.0/raw/libdcr.c b/lib/cximage-6.0/raw/libdcr.c
index 7e357f2ed7..3d289c5a29 100644
--- a/lib/cximage-6.0/raw/libdcr.c
+++ b/lib/cximage-6.0/raw/libdcr.c
@@ -2471,8 +2471,12 @@ void DCR_CLASS dcr_sony_decrypt (DCRAW *p, unsigned *data, int len, int start, i
for (p->sony_decrypt_p=0; p->sony_decrypt_p < 127; p->sony_decrypt_p++)
p->sony_decrypt_pad[p->sony_decrypt_p] = htonl(p->sony_decrypt_pad[p->sony_decrypt_p]);
}
- while (len--)
- *data++ ^= p->sony_decrypt_pad[p->sony_decrypt_p++ & 127] = p->sony_decrypt_pad[(p->sony_decrypt_p+1) & 127] ^ p->sony_decrypt_pad[(p->sony_decrypt_p+65) & 127];
+ while (len--) {
+ p->sony_decrypt_pad[p->sony_decrypt_p & 127] = p->sony_decrypt_pad[(p->sony_decrypt_p+1) & 127] ^ p->sony_decrypt_pad[(p->sony_decrypt_p+65) & 127];
+ *data ^= p->sony_decrypt_pad[p->sony_decrypt_p & 127];
+ data++;
+ p->sony_decrypt_p++;
+ }
}
void DCR_CLASS dcr_sony_load_raw(DCRAW* p)