summaryrefslogtreecommitdiff
path: root/thirdparty/liblcms2/src/cmsplugin.c
diff options
context:
space:
mode:
authorMatthieu Darbois <mayeut@users.noreply.github.com>2016-08-06 13:04:56 +0200
committerGitHub <noreply@github.com>2016-08-06 13:04:56 +0200
commit4a2a8693e5a02207a8813b02a375abdc4e43c49b (patch)
tree546b6aa9a7ed2bdbd215775ef1bf375e2d6a0598 /thirdparty/liblcms2/src/cmsplugin.c
parent1509ccc51f8de0523821ffd2f3d1946b10e49614 (diff)
Update to lcms 2.8 (#808)
Diffstat (limited to 'thirdparty/liblcms2/src/cmsplugin.c')
-rw-r--r--thirdparty/liblcms2/src/cmsplugin.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/thirdparty/liblcms2/src/cmsplugin.c b/thirdparty/liblcms2/src/cmsplugin.c
index dc13eadb..79b145d2 100644
--- a/thirdparty/liblcms2/src/cmsplugin.c
+++ b/thirdparty/liblcms2/src/cmsplugin.c
@@ -107,7 +107,7 @@ void CMSEXPORT _cmsAdjustEndianess64(cmsUInt64Number* Result, cmsUInt64Number*
#endif
}
-// Auxiliar -- read 8, 16 and 32-bit numbers
+// Auxiliary -- read 8, 16 and 32-bit numbers
cmsBool CMSEXPORT _cmsReadUInt8Number(cmsIOHANDLER* io, cmsUInt8Number* n)
{
cmsUInt8Number tmp;
@@ -172,13 +172,13 @@ cmsBool CMSEXPORT _cmsReadFloat32Number(cmsIOHANDLER* io, cmsFloat32Number* n)
_cmsAssert(io != NULL);
- if (io -> Read(io, &tmp, sizeof(cmsFloat32Number), 1) != 1)
+ if (io -> Read(io, &tmp, sizeof(cmsUInt32Number), 1) != 1)
return FALSE;
if (n != NULL) {
tmp = _cmsAdjustEndianess32(tmp);
- *n = *(cmsFloat32Number*) &tmp;
+ *n = *(cmsFloat32Number*) (void*) &tmp;
}
return TRUE;
}
@@ -289,7 +289,7 @@ cmsBool CMSEXPORT _cmsWriteFloat32Number(cmsIOHANDLER* io, cmsFloat32Number n)
_cmsAssert(io != NULL);
- tmp = *(cmsUInt32Number*) &n;
+ tmp = *(cmsUInt32Number*) (void*) &n;
tmp = _cmsAdjustEndianess32(tmp);
if (io -> Write(io, sizeof(cmsUInt32Number), &tmp) != 1)
return FALSE;
@@ -485,7 +485,10 @@ cmsBool CMSEXPORT _cmsIOPrintf(cmsIOHANDLER* io, const char* frm, ...)
va_start(args, frm);
len = vsnprintf((char*) Buffer, 2047, frm, args);
- if (len < 0) return FALSE; // Truncated, which is a fatal error for us
+ if (len < 0) {
+ va_end(args);
+ return FALSE; // Truncated, which is a fatal error for us
+ }
rc = io ->Write(io, len, Buffer);