2022-06-22 17:26 ftp://ftp.de.debian.org/debian/pool/main/j/jhead/jhead_3.06.0.1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j2 platform: Linux-5.10.0-15-cloud-amd64-x86_64-with-glibc2.31 python: 3.9.2 client-version: 1.3.25 compiler: g++ (Debian 10.2.1-6) 10.2.1 20210110 cppcheck: head 2.8 head-info: 650f409 (2022-06-22 08:46:48 +0200) count: 53 53 elapsed-time: 52.6 84.4 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: jhead-3.06.0.1/gpsinfo.c:197:37: style: Condition 'ZeroSkipped' is always false [knownConditionTrueFalse] jhead-3.06.0.1/gpsinfo.c:195:47: note: Assignment 'ZeroSkipped=0', assigned value is 0 jhead-3.06.0.1/gpsinfo.c:197:37: note: Condition 'ZeroSkipped' is always false jhead-3.06.0.1/gpsinfo.c:56:37: style:inconclusive: Function 'ProcessGpsInfo' argument 1 names different: declaration 'ValuePtr' definition 'DirStart'. [funcArgNamesDifferent] jhead-3.06.0.1/jhead.h:202:37: note: Function 'ProcessGpsInfo' argument 1 names different: declaration 'ValuePtr' definition 'DirStart'. jhead-3.06.0.1/gpsinfo.c:56:37: note: Function 'ProcessGpsInfo' argument 1 names different: declaration 'ValuePtr' definition 'DirStart'. jhead-3.06.0.1/gpsinfo.c:199:49: style: Variable 'ZeroSkipped' is assigned a value that is never used. [unreadVariable] jhead-3.06.0.1/gpsinfo.c:204:49: style: Variable 'ZeroSkipped' is assigned a value that is never used. [unreadVariable] jhead-3.06.0.1/iptc.c:119:19: warning: Opposite inner 'if' condition leads to a dead code block. [oppositeInnerCondition] jhead-3.06.0.1/iptc.c:113:18: note: outer condition: pos+5maxpos jhead-3.06.0.1/iptc.c:52:32: style:inconclusive: Function 'show_IPTC' argument 1 names different: declaration 'CharBuf' definition 'Data'. [funcArgNamesDifferent] jhead-3.06.0.1/jhead.h:206:33: note: Function 'show_IPTC' argument 1 names different: declaration 'CharBuf' definition 'Data'. jhead-3.06.0.1/iptc.c:52:32: note: Function 'show_IPTC' argument 1 names different: declaration 'CharBuf' definition 'Data'. jhead-3.06.0.1/iptc.c:52:51: style:inconclusive: Function 'show_IPTC' argument 2 names different: declaration 'length' definition 'itemlen'. [funcArgNamesDifferent] jhead-3.06.0.1/jhead.h:206:55: note: Function 'show_IPTC' argument 2 names different: declaration 'length' definition 'itemlen'. jhead-3.06.0.1/iptc.c:52:51: note: Function 'show_IPTC' argument 2 names different: declaration 'length' definition 'itemlen'. jhead-3.06.0.1/exif.c:545:34: style: Condition '(unsigned int)Components>0x10000' is always false [knownConditionTrueFalse] jhead-3.06.0.1/exif.c:533:24: note: Assuming that condition 'Components>0x10000' is not redundant jhead-3.06.0.1/exif.c:539:24: note: Assuming condition is false jhead-3.06.0.1/exif.c:545:34: note: Condition '(unsigned int)Components>0x10000' is always false jhead-3.06.0.1/exif.c:383:17: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/exif.c:383:17: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/exif.c:512:13: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/exif.c:512:13: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/exif.c:987:17: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/exif.c:1016:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/exif.c:1322:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/exif.c:1338:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/exif.c:1338:5: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/exif.c:1592:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/exif.c:1592:5: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/exif.c:1221:16: warning: Either the condition 'NewBuf==NULL' is redundant or there is possible null pointer dereference: NewBuf. [nullPointerRedundantCheck] jhead-3.06.0.1/exif.c:1218:20: note: Assuming that condition 'NewBuf==NULL' is not redundant jhead-3.06.0.1/exif.c:1221:16: note: Null pointer dereference jhead-3.06.0.1/exif.c:396:26: portability: Casting between signed int * and float * which have an incompatible binary data representation. [invalidPointerCast] jhead-3.06.0.1/exif.c:460:26: portability: Casting between signed int * and float * which have an incompatible binary data representation. [invalidPointerCast] jhead-3.06.0.1/exif.c:1008:36: style:inconclusive: Function 'process_EXIF' argument 1 names different: declaration 'CharBuf' definition 'ExifSection'. [funcArgNamesDifferent] jhead-3.06.0.1/jhead.h:166:36: note: Function 'process_EXIF' argument 1 names different: declaration 'CharBuf' definition 'ExifSection'. jhead-3.06.0.1/exif.c:1008:36: note: Function 'process_EXIF' argument 1 names different: declaration 'CharBuf' definition 'ExifSection'. jhead-3.06.0.1/jpgfile.c:295:33: style: Condition 'ShowTags' is always true [knownConditionTrueFalse] jhead-3.06.0.1/jpgfile.c:182:9: warning: Either the condition 'Data==NULL' is redundant or there is possible null pointer dereference: Data. [nullPointerRedundantCheck] jhead-3.06.0.1/jpgfile.c:176:18: note: Assuming that condition 'Data==NULL' is not redundant jhead-3.06.0.1/jpgfile.c:182:9: note: Null pointer dereference jhead-3.06.0.1/jpgfile.c:183:9: warning: Either the condition 'Data==NULL' is redundant or there is possible null pointer dereference: Data. [nullPointerRedundantCheck] jhead-3.06.0.1/jpgfile.c:176:18: note: Assuming that condition 'Data==NULL' is not redundant jhead-3.06.0.1/jpgfile.c:183:9: note: Null pointer dereference jhead-3.06.0.1/jpgfile.c:209:33: warning: Either the condition 'Data==NULL' is redundant or there is possible null pointer dereference: Data. [nullPointerRedundantCheck] jhead-3.06.0.1/jpgfile.c:205:30: note: Assuming that condition 'Data==NULL' is not redundant jhead-3.06.0.1/jpgfile.c:209:33: note: Null pointer dereference jhead-3.06.0.1/jpgfile.c:581:16: warning: Either the condition 'outfile==NULL' is redundant or there is possible null pointer dereference: outfile. [nullPointerRedundantCheck] jhead-3.06.0.1/jpgfile.c:576:17: note: Assuming that condition 'outfile==NULL' is not redundant jhead-3.06.0.1/jpgfile.c:581:16: note: Null pointer dereference jhead-3.06.0.1/jpgfile.c:582:16: warning: Either the condition 'outfile==NULL' is redundant or there is possible null pointer dereference: outfile. [nullPointerRedundantCheck] jhead-3.06.0.1/jpgfile.c:576:17: note: Assuming that condition 'outfile==NULL' is not redundant jhead-3.06.0.1/jpgfile.c:582:16: note: Null pointer dereference jhead-3.06.0.1/jpgfile.c:185:25: warning: Either the condition 'Data==NULL' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck] jhead-3.06.0.1/jpgfile.c:176:18: note: Assuming that condition 'Data==NULL' is not redundant jhead-3.06.0.1/jpgfile.c:185:25: note: Null pointer addition jhead-3.06.0.1/jpgfile.c:731:70: style:inconclusive: Function 'CreateSection' argument 3 names different: declaration 'size' definition 'Size'. [funcArgNamesDifferent] jhead-3.06.0.1/jhead.h:230:70: note: Function 'CreateSection' argument 3 names different: declaration 'size' definition 'Size'. jhead-3.06.0.1/jpgfile.c:731:70: note: Function 'CreateSection' argument 3 names different: declaration 'size' definition 'Size'. jhead-3.06.0.1/makernote.c:62:34: style: Condition '(unsigned int)Components>0x10000' is always false [knownConditionTrueFalse] jhead-3.06.0.1/makernote.c:50:24: note: Assuming that condition 'Components>0x10000' is not redundant jhead-3.06.0.1/makernote.c:56:24: note: Assuming condition is false jhead-3.06.0.1/makernote.c:62:34: note: Condition '(unsigned int)Components>0x10000' is always false jhead-3.06.0.1/makernote.c:105:33: style: Condition 'ZeroSkipped' is always false [knownConditionTrueFalse] jhead-3.06.0.1/makernote.c:103:43: note: Assignment 'ZeroSkipped=0', assigned value is 0 jhead-3.06.0.1/makernote.c:105:33: note: Condition 'ZeroSkipped' is always false jhead-3.06.0.1/makernote.c:31:13: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/makernote.c:31:13: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] jhead-3.06.0.1/makernote.c:80:17: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/makernote.c:80:17: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/makernote.c:181:39: style:inconclusive: Function 'ProcessMakerNote' argument 1 names different: declaration 'DirStart' definition 'ValuePtr'. [funcArgNamesDifferent] jhead-3.06.0.1/jhead.h:198:46: note: Function 'ProcessMakerNote' argument 1 names different: declaration 'DirStart' definition 'ValuePtr'. jhead-3.06.0.1/makernote.c:181:39: note: Function 'ProcessMakerNote' argument 1 names different: declaration 'DirStart' definition 'ValuePtr'. jhead-3.06.0.1/makernote.c:107:45: style: Variable 'ZeroSkipped' is assigned a value that is never used. [unreadVariable] jhead-3.06.0.1/makernote.c:112:45: style: Variable 'ZeroSkipped' is assigned a value that is never used. [unreadVariable] jhead-3.06.0.1/myglob.c:178:17: error: Common realloc mistake: 'FileList' nulled but not freed upon failure [memleakOnRealloc] jhead-3.06.0.1/jhead.c:380:5: warning: Return value of function mktemp() is not used. [ignoredReturnValue] jhead-3.06.0.1/jhead.c:380:5: warning: Obsolete function 'mktemp' called. It is recommended to use 'mkstemp' or 'mkdtemp' instead. [prohibitedmktempCalled] jhead-3.06.0.1/jhead.c:437:17: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] jhead-3.06.0.1/jhead.c:600:15: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] jhead-3.06.0.1/jhead.c:803:11: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] jhead-3.06.0.1/jhead.c:1151:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] jhead-3.06.0.1/jhead.c:1219:13: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] jhead-3.06.0.1/jhead.c:1242:17: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] jhead-3.06.0.1/jhead.c:302:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] jhead-3.06.0.1/jhead.c:669:14: style: Local variable 'NewName' shadows outer variable [shadowVariable] jhead-3.06.0.1/jhead.c:582:10: note: Shadowed declaration jhead-3.06.0.1/jhead.c:669:14: note: Shadow variable jhead-3.06.0.1/jhead.c:202:60: style: Parameter 'SrcComment' can be declared as pointer to const [constParameter] jhead-3.06.0.1/jhead.c:1079:20: error: Uninitialized variable: Comment [legacyUninitvar] diff: head jhead-3.06.0.1/jhead.c:202:60: style: Parameter 'SrcComment' can be declared as pointer to const [constParameter] 2.8 jhead-3.06.0.1/jhead.c:202:60: style: Parameter 'SrcComment' can be declared with const [constParameter] DONE