Browse Source

- removed unused variable

- removed useless tests in assertions
development
Andreas Romeyke 2 years ago
parent
commit
3004fe71b0
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/helper/check_tiffparse.c

+ 4
- 4
src/helper/check_tiffparse.c View File

@ -337,7 +337,7 @@ ret_t get_first_IFD(ctiff_t * ctif, uint32 * ifd) {
/* scans first IDF and returns the n-th tag */
tag_t TIFFGetRawTagListEntry( ctiff_t * ctif, int tagidx ) {
int byteswapped = is_byteswapped(ctif);
uint16 count = get_ifd0_count( ctif);
get_ifd0_count( ctif); /* return code ignored, used to read TIFF header */
/* ct_read count of tags (2 Bytes) */
uint32 adress = ctif->ifd0pos+2+tagidx*12;
if (ct_seek(ctif, adress , SEEK_SET) != adress) { /* IFD0 plus 2byte to get IFD-entries, then nth tag */
@ -836,7 +836,7 @@ ret_t TIFFGetFieldASCII(ctiff_t * ctif, const tag_t tag, char** string_pp, uint3
return ret;
}
if (entry.value_or_offset == is_value) {
assert (entry.count >= 0 && entry.count <= 4);
assert (entry.count <= 4);
for (uint32 i=0; i<entry.count; i++) {
(*string_pp)[i]=entry.data8[i];
}
@ -906,7 +906,7 @@ ret_t TIFFGetFieldLONG(ctiff_t * ctif, const tag_t tag, uint32 ** long_pp, uint3
}
if (entry.value_or_offset == is_value) {
assert (entry.count >= 0 && entry.count <= 1);
assert (entry.count <= 1);
//printf("LONG (direct)=%lu\n", entry.data32);
memcpy((void *) (*long_pp), (void *) &entry.data32, (sizeof(uint32)*entry.count));
ret.returncode=is_valid;
@ -963,7 +963,7 @@ ret_t TIFFGetFieldSHORT(ctiff_t * ctif, const tag_t tag, uint16 ** short_pp, uin
}
if (entry.value_or_offset == is_value) {
assert (entry.count >= 0 && entry.count <= 2);
assert (entry.count <= 2);
memcpy((void *) (*short_pp), (void *) &entry.data16, (sizeof(uint16)*entry.count));
//printf("SHORT (direct)=%u %u\n", entry.data32, **short_pp);
ret.returncode=is_valid;


Loading…
Cancel
Save