Browse Source

- minor, removed unused variable assignment

development
Andreas Romeyke 2 years ago
parent
commit
e761e8f062
1 changed files with 5 additions and 6 deletions
  1. +5
    -6
      src/tagrules/check_icc.c

+ 5
- 6
src/tagrules/check_icc.c View File

@ -1,7 +1,7 @@
/* rule based checks if given TIFF is a specific baseline TIFF
*
*
* author: Andreas Romeyke, 2015/16
* licensed under conditions of libtiff
* licensed under conditions of libtiff
* (see http://libtiff.maptools.org/misc.html)
*
*/
@ -24,11 +24,10 @@ ret_t check_icc(ctiff_t * ctif ) {
switch (ifd_entry.datatype) { /* icc datatype should be undefined (val=7) */
case TIFF_UNDEFINED: {
icc_profile_size = ifd_entry.count;
uint32 count= ifd_entry.count;
/* offset */
if (ifd_entry.value_or_offset == is_offset) {
offset_t offset;
ret = read_offsetdata(ctif, ifd_entry.data32offset, count, ifd_entry.datatype, &offset, &ret);
ret = read_offsetdata(ctif, ifd_entry.data32offset, icc_profile_size, ifd_entry.datatype, &offset, &ret);
if (ret.returncode != is_valid) return ret;
icc_profile = (char *)offset.data32p;
} else {
@ -60,9 +59,9 @@ ret_t check_icc(ctiff_t * ctif ) {
unsigned long errsize = VALUESTRLEN;
icc_returncode_t icc_ret = parse_icc(icc_profile_size, icc_profile, errsize, errmessage);
if (NULL != icc_profile) free(icc_profile);
ret.returncode = should_not_occur;
ret.returncode = should_not_occur;
switch (icc_ret) { /* map between returncodes icc profile and tag check */
case icc_is_valid: ret.returncode = is_valid; break;
case icc_is_valid: ret.returncode = is_valid; break;
case icc_error_profileclass: ret.returncode = iccerror_profileclass; break;
case icc_error_colorspacedata: ret.returncode = iccerror_colorspacedata; break;
case icc_error_connectionspacedata: ret.returncode = iccerror_connectionspacedata; break;


Loading…
Cancel
Save