Browse Source

- fixed Debian related warnings

pull/3/head
Andreas Romeyke 4 years ago
parent
commit
d50afd0ee6
  1. 2
      README.1st_checkit
  2. 20
      src/helper/check_tiffparse.c
  3. 6
      src/parser/config_parser.c
  4. 20
      src/validate_icc/check_icc_header.c

2
README.1st_checkit

@ -101,6 +101,6 @@ check if tag 306 (DateTime) has value matching regex '^[12][901][0-9][0-9]:[01]
tag 306 (DateTime) should have value ^[12][901][0-9][0-9]:[01][0-9]:[0-3][0-9] [012][0-9]:[0-5][0-9]:[0-6][0-9]$, but has value (values or count) 04.03.2010 09:59:17
check if forbidden tags are still existing
tag 315 (Artist) is_found, but is not whitelisted (or rule has no matched dependency)
tag 34377 (Photoshop Image Ressources) is_found, but is not whitelisted (or rule has no matched dependency)
tag 34377 (Photoshop Image Resources) is_found, but is not whitelisted (or rule has no matched dependency)
found 4 errors

20
src/helper/check_tiffparse.c

@ -223,13 +223,13 @@ const char * TIFFTagName( tag_t tag ) {
/* 559 */ case TIFFTAG_STRIPROWCOUNTS: return ("StripRowCounts");
/* 700 */ case TIFFTAG_XMLPACKET: return ("XMP");
/* 20507 */ case 20507: return ("inofficial EXIF ThumbnailData (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20515 */ case 20515: return ("inofficial EXIF ThumbnailCompression (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20525 */ case 20525: return ("inofficial EXIF ThumbnailResolutionX (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20526 */ case 20526: return ("inofficial EXIF ThumbnailResolutionY (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20528 */ case 20528: return ("inofficial EXIF ThumbnailResolutionUnit (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20624 */ case 20624: return ("inofficial EXIF LuminanceTable (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20625 */ case 20625: return ("inofficial EXIF ChrominanceTable (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20507 */ case 20507: return ("unofficial EXIF ThumbnailData (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20515 */ case 20515: return ("unofficial EXIF ThumbnailCompression (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20525 */ case 20525: return ("unofficial EXIF ThumbnailResolutionX (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20526 */ case 20526: return ("unofficial EXIF ThumbnailResolutionY (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20528 */ case 20528: return ("unofficial EXIF ThumbnailResolutionUnit (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20624 */ case 20624: return ("unofficial EXIF LuminanceTable (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 20625 */ case 20625: return ("unofficial EXIF ChrominanceTable (poss. Olympus)"); /* see http://www.stefanheymann.de/homegallery/exif-felder.htm, but not in Exif2.3 standard */
/* 32768 -, 0x8000 - */
/* 32768 */ case 32768: return ("OLD BOGUS Matteing tag" );
@ -334,7 +334,7 @@ const char * TIFFTagName( tag_t tag ) {
/* 34361 */ case 34361: return ("MMHeader (Olympus Fluoview or Andor Bio-imaging Division)"); /* https://github.com/openmicroscopy/bioformats/blob/v5.2.4/components/formats-gpl/src/loci/formats/in/FluoviewReader.java */
/* 34362 */ case 34362: return ("MMStamp (Olympus Fluoview or Andor Bio-imaging Division)"); /* https://github.com/openmicroscopy/bioformats/blob/v5.2.4/components/formats-gpl/src/loci/formats/in/FluoviewReader.java */
/* 34377 */ case TIFFTAG_PHOTOSHOP: return ("Photoshop Image Ressources"); /* see http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577413_pgfId-1039502, also see paragraph "Photoshop Image Resource Metadata Structure" in http://help.accusoft.com/ImageGear/v17.2/Windows/DLL/topic755.html or http://fileformats.archiveteam.org/wiki/Photoshop_Image_Resources, this points to http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_pgfId-1037685 and http://www.awaresystems.be/imaging/tiff/tifftags/docs/photoshopthumbnail.html*/
/* 34377 */ case TIFFTAG_PHOTOSHOP: return ("Photoshop Image Resources"); /* see http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577413_pgfId-1039502, also see paragraph "Photoshop Image Resource Metadata Structure" in http://help.accusoft.com/ImageGear/v17.2/Windows/DLL/topic755.html or http://fileformats.archiveteam.org/wiki/Photoshop_Image_Resources, this points to http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_pgfId-1037685 and http://www.awaresystems.be/imaging/tiff/tifftags/docs/photoshopthumbnail.html*/
/* 34665 */ case TIFFTAG_EXIFIFD: return ("EXIFIFDOffset");
/* 34675 */ case TIFFTAG_ICCPROFILE: return ("ICC Profile" );
/* 34730 */ case 34730: return ("Annotation Offsets (Wang TIFF)"); /* line 134, https://github.com/gasgas4/NT_4.0_SourceCode/blob/master/nt4/private/wangview/xfilexr/include/tiffint.h */
@ -470,7 +470,7 @@ const char * TIFFTagName( tag_t tag ) {
/* 50217 */ case 50217: return ("Oce Identification Number"); /* see http://www.rastermaster.com/RasterMaster%20DLL%20manual/WebHelp/Content/aptifftagswide.htm for explanation of tag or http://www.awaresystems.be/imaging/tiff/tifftags/docs/oce.html*/
/* 50218 */ case 50218: return ("Oce ImageLogic Characteristics"); /* see http://www.rastermaster.com/RasterMaster%20DLL%20manual/WebHelp/Content/aptifftagswide.htm for explanation of tag or http://www.awaresystems.be/imaging/tiff/tifftags/docs/oce.html*/
/* 50255 */ case 50255: return ("Photoshop Annotations"); /* http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_17312 */
/* 50341 */ case 50341: return ("inofficial EXIF PrintImageMatching (poss. Olympus)"); /* see http://www.exiv2.org/tags.html, but not in Exif2.3 standard */
/* 50341 */ case 50341: return ("unofficial EXIF PrintImageMatching (poss. Olympus)"); /* see http://www.exiv2.org/tags.html, but not in Exif2.3 standard */
/* 50454 */ case 50454: return ("unknown Sinar tag"); /* http://hg.corpus-callosum.com/X3F_Utilities/X3F_qlgenerator/rev/177b9a6b3b14?revcount=30 */
/* 50455 */ case 50455: return ("unknown Sinar tag"); /* http://hg.corpus-callosum.com/X3F_Utilities/X3F_qlgenerator/rev/177b9a6b3b14?revcount=30 */
/* 50459 */ case 50459: return ("Hasselblad IFD"); /* http://hg.corpus-callosum.com/X3F_Utilities/X3F_qlgenerator/rev/177b9a6b3b14?revcount=30 */
@ -915,7 +915,7 @@ offset_t read_offsetdata( ctiff_t * ctif, uint32 address, uint32 count, uint16 d
assert( sizeof(double) == 8);
offset_malloc(fd, offset.datas64p, int64, count)
break;
default: /* should not occure */
default: /* should not occur */
fprintf(stderr, "offsetdata datatype=%i not supported yet", datatype);
exit(EXIT_FAILURE);
};

6
src/parser/config_parser.c

@ -461,7 +461,7 @@ void commentline() {
}
/* helper function for parser */
/*
void rule_should_not_occure(char* s) {
void rule_should_not_occur(char* s) {
#ifdef DEBUG
printf("no parser rule matched after line %i (prev tag was %u): '%s'\n", getlineno(), gettag(), s);
#endif
@ -623,7 +623,7 @@ void evaluate_req_and_push_exe(requirements_t req, internal_entry_t e) {
}
default:
{
fprintf(stderr, "unknown parserstate.req (%i), should not occure\n", parser_state.req);
fprintf(stderr, "unknown parserstate.req (%i), should not occur\n", parser_state.req);
exit(EXIT_FAILURE);
}
}
@ -676,7 +676,7 @@ void build_functional_structure(internal_entry_t * e_p, values_t val) {
break;
}
default:
fprintf(stderr, "unknown val, should not occure\n");
fprintf(stderr, "unknown val, should not occur\n");
exit(EXIT_FAILURE);
}
}

20
src/validate_icc/check_icc_header.c

@ -27,7 +27,7 @@ int parse_icc_header_v240_v430(unsigned long iccsize, char * iccdata, unsigned l
(iccdata[3] & 0x00ff)
) & 0xffffffff;
INFO("ICC: profilesize=%li %0x\n", profilesize, profilesize);
if (profilesize != iccsize) FAIL("commited ICC size (%li / 0x%04x) differs from encoded profilesize (%li / 0x%04x)", iccsize, iccsize, profilesize, profilesize);
if (profilesize != iccsize) FAIL("committed ICC size (%li / 0x%04x) differs from encoded profilesize (%li / 0x%04x)", iccsize, iccsize, profilesize, profilesize);
/* -- */
char preferredcmmtype[5]=" "; memcpy(preferredcmmtype, &iccdata[4],4);
INFO("ICC: preferredcmmtype='%s'\n", preferredcmmtype);
@ -131,16 +131,16 @@ int parse_icc_header_v240_v430(unsigned long iccsize, char * iccdata, unsigned l
char profilefilesignature[5]=" "; memcpy(profilefilesignature, &iccdata[36],4);
INFO("ICC: profilefilesignature='%s'\n", profilefilesignature);
/* -- */
char primaryplattformsignature[5]=" "; memcpy(primaryplattformsignature, &iccdata[40],4);
INFO("ICC: primaryplattformsignature='%s'\n", primaryplattformsignature);
char primaryplatformsignature[5]=" "; memcpy(primaryplatformsignature, &iccdata[40],4);
INFO("ICC: primaryplatformsignature='%s'\n", primaryplatformsignature);
if ( /* see page 15, table 15 of http://www.color.org/ICC_Minor_Revision_for_Web.pdf */
('\0' != primaryplattformsignature[0]) &&
(0 != strncmp("APPL", primaryplattformsignature, 4)) &&
(0 != strncmp("MSFT", primaryplattformsignature, 4)) &&
(0 != strncmp("SGI ", primaryplattformsignature, 4)) &&
(0 != strncmp("SUNW", primaryplattformsignature, 4)) &&
(0 != strncmp("TGNT", primaryplattformsignature, 4))
) FAIL("primary plattform signature ('%s') should be empty or one of following strings: 'APPL', 'MSFT', 'SGI ', 'SUNW', 'TGNT'", primaryplattformsignature);
('\0' != primaryplatformsignature[0]) &&
(0 != strncmp("APPL", primaryplatformsignature, 4)) &&
(0 != strncmp("MSFT", primaryplatformsignature, 4)) &&
(0 != strncmp("SGI ", primaryplatformsignature, 4)) &&
(0 != strncmp("SUNW", primaryplatformsignature, 4)) &&
(0 != strncmp("TGNT", primaryplatformsignature, 4))
) FAIL("primary platform signature ('%s') should be empty or one of following strings: 'APPL', 'MSFT', 'SGI ', 'SUNW', 'TGNT'", primaryplatformsignature);
/* -- */
// Profile Flags 44-47

Loading…
Cancel
Save