2026-05-01 07:54 ftp://ftp.de.debian.org/debian/pool/main/c/catdoc/catdoc_0.95.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.70 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04.1) 14.2.0 cppcheck: head 2.20.0 head-info: 0fda84e (2026-05-01 02:32:52 +0200) count: 90 88 elapsed-time: 1.5 1.3 head-timing-info: old-timing-info: head results: catdoc-0.95/compat/langinfo.c:19:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CODESET [valueFlowBailoutIncompleteVar] catdoc-0.95/src/analyze.c:49:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/analyze.c:120:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/analyze.c:150:3: warning: %lx in format string (no. 1) requires 'unsigned long' but the argument type is 'signed int'. [invalidPrintfArgType_uint] catdoc-0.95/src/analyze.c:28:13: style: Variable 'offset' is assigned a value that is never used. [unreadVariable] catdoc-0.95/src/catdoc.c:62:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] catdoc-0.95/src/catppt.c:78:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] catdoc-0.95/src/charsets.c:58:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/charsets.c:81:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/charsets.c:122:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] catdoc-0.95/src/charsets.c:142:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] catdoc-0.95/src/charsets.c:161:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] catdoc-0.95/src/charsets.c:176:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] catdoc-0.95/src/charsets.c:298:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] catdoc-0.95/src/charsets.c:55:8: warning: If memory allocation fails, then there is a possible null pointer dereference: newmap [nullPointerOutOfMemory] catdoc-0.95/src/charsets.c:45:23: note: Assuming allocation function fails catdoc-0.95/src/charsets.c:45:23: note: Assignment 'newmap=calloc(sizeof(short*),256)', assigned value is 0 catdoc-0.95/src/charsets.c:48:6: note: Assuming condition is false catdoc-0.95/src/charsets.c:55:8: note: Null pointer dereference catdoc-0.95/src/charsets.c:95:3: warning: If memory allocation fails, then there is a possible null pointer dereference: new [nullPointerOutOfMemory] catdoc-0.95/src/charsets.c:93:14: note: Assuming allocation function fails catdoc-0.95/src/charsets.c:93:14: note: Assignment 'new=calloc(sizeof(short),256)', assigned value is 0 catdoc-0.95/src/charsets.c:95:3: note: Null pointer dereference catdoc-0.95/src/charsets.c:183:34: style: Checking if unsigned expression 'catdoc_read(buf+1,1,1,f)' is less than zero. [unsignedLessThanZero] catdoc-0.95/src/charsets.c:202:24: style:inconclusive: Function 'convert_char' argument 1 names different: declaration 'unicode_char' definition 'uc'. [funcArgNamesDifferent] catdoc-0.95/src/catdoc.h:215:31: note: Function 'convert_char' argument 1 names different: declaration 'unicode_char' definition 'uc'. catdoc-0.95/src/charsets.c:202:24: note: Function 'convert_char' argument 1 names different: declaration 'unicode_char' definition 'uc'. catdoc-0.95/src/charsets.c:25:27: style: Parameter 'charset' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/charsets.c:33:13: style: Variable 'p' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/charsets.c:44:37: style: Parameter 'charset' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/charsets.c:292:17: style: Variable 'cp' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/confutil.c:48:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/confutil.c:169:15: error: Returning pointer to local variable 'newstr' that will be invalid when returning. [returnDanglingLifetime] catdoc-0.95/src/confutil.c:169:16: note: Passed to 'strcpy'. catdoc-0.95/src/confutil.c:167:8: note: Variable created here. catdoc-0.95/src/confutil.c:169:15: note: Returning pointer to local variable 'newstr' that will be invalid when returning. catdoc-0.95/src/confutil.c:169:16: warning: If memory allocation fails, then there is a possible null pointer dereference: newstr [nullPointerOutOfMemory] catdoc-0.95/src/confutil.c:168:15: note: Assuming allocation function fails catdoc-0.95/src/confutil.c:168:15: note: Assignment 'newstr=malloc(size+1)', assigned value is 0 catdoc-0.95/src/confutil.c:169:16: note: Null pointer dereference catdoc-0.95/src/fileutil.c:126:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/fileutil.c:188:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GLOB_ERR [valueFlowBailoutIncompleteVar] catdoc-0.95/src/fileutil.c:33:9: style: Variable 'home' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/fileutil.c:73:7: style: Variable 'dir_sep' can be declared as const array [constVariable] catdoc-0.95/src/fileutil.c:181:7: style: Variable 'dir_sep' can be declared as const array [constVariable] catdoc-0.95/src/numutils.c:14:34: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/numutils.c:21:32: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/numutils.c:26:34: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/ole.c:67:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] catdoc-0.95/src/ole.c:596:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] catdoc-0.95/src/ole.c:357:13: style: Unsigned expression 'e->length' can't be negative so it is unnecessary to test it. [unsignedPositive] catdoc-0.95/src/ole.c:422:20: style:inconclusive: Function 'ole_open' argument 1 names different: declaration '' definition 'stream'. [funcArgNamesDifferentUnnamed] catdoc-0.95/src/ole.c:558:21: style:inconclusive: Function 'ole_close' argument 1 names different: declaration '' definition 'stream'. [funcArgNamesDifferentUnnamed] catdoc-0.95/src/ole.c:54:31: style: Parameter 'buffer' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/ole.c:294:33: style: Parameter 'oleBuf' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/ole.c:306:35: style: Parameter 'oleBuf' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/ole.c:532:12: style: Variable 'e' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/ole.c:625:12: style: Variable 'e' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/ole.c:108:14: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] catdoc-0.95/src/ole.c:109:17: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] catdoc-0.95/src/pptparse.c:45:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] catdoc-0.95/src/pptparse.c:95:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] catdoc-0.95/src/pptparse.c:70:14: style: Condition 'reclen<0' is always false [knownConditionTrueFalse] catdoc-0.95/src/pptparse.c:69:18: note: Assignment 'reclen=getulong(recbuf,4)', assigned value is greater than -1 catdoc-0.95/src/pptparse.c:70:14: note: Condition 'reclen<0' is always false catdoc-0.95/src/reader.c:34:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] catdoc-0.95/src/reader.c:24:30: style: Parameter 'header' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/rtfread.c:319:9: error: Common realloc mistake: 'groups' nulled but not freed upon failure [memleakOnRealloc] catdoc-0.95/src/rtfread.c:439:21: style: Redundant initialization for 'cc'. The initialized value is overwritten before it is read. [redundantInitialization] catdoc-0.95/src/rtfread.c:438:8: note: cc is initialized catdoc-0.95/src/rtfread.c:439:21: note: cc is overwritten catdoc-0.95/src/rtfread.c:266:10: style: Local variable 'c' shadows outer variable [shadowVariable] catdoc-0.95/src/rtfread.c:207:7: note: Shadowed declaration catdoc-0.95/src/rtfread.c:266:10: note: Shadow variable catdoc-0.95/src/rtfread.c:450:31: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/rtfread.c:126:6: style: struct member 'RTFFont::name' is never used. [unusedStructMember] catdoc-0.95/src/rtfread.c:127:7: style: struct member 'RTFFont::fontname' is never used. [unusedStructMember] catdoc-0.95/src/rtfread.c:135:6: style: struct member 'RTFStyle::codepage' is never used. [unusedStructMember] catdoc-0.95/src/sheet.c:108:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] catdoc-0.95/src/sheet.c:135:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] catdoc-0.95/src/sheet.c:76:33: style: Parameter 'value' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/substmap.c:49:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/substmap.c:166:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/writer.c:32:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] catdoc-0.95/src/writer.c:80:8: style: Redundant initialization for 'q'. The initialized value is overwritten before it is read. [redundantInitialization] catdoc-0.95/src/writer.c:60:10: note: q is initialized catdoc-0.95/src/writer.c:80:8: note: q is overwritten catdoc-0.95/src/writer.c:48:9: style: Local variable 'q' shadows outer variable [shadowVariable] catdoc-0.95/src/writer.c:30:23: note: Shadowed declaration catdoc-0.95/src/writer.c:48:9: note: Shadow variable catdoc-0.95/src/writer.c:60:9: style: Local variable 'q' shadows outer variable [shadowVariable] catdoc-0.95/src/writer.c:30:23: note: Shadowed declaration catdoc-0.95/src/writer.c:60:9: note: Shadow variable catdoc-0.95/src/writer.c:60:25: style: Local variable 'p' shadows outer variable [shadowVariable] catdoc-0.95/src/writer.c:30:14: note: Shadowed declaration catdoc-0.95/src/writer.c:60:25: note: Shadow variable catdoc-0.95/src/writer.c:48:9: style: Variable 'q' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/xls2csv.c:71:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] catdoc-0.95/src/xlsparse.c:78:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/xlsparse.c:146:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/xlsparse.c:649:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] catdoc-0.95/src/xlsparse.c:679:33: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] catdoc-0.95/src/xlsparse.c:106:49: style: Condition 'reclen>0' is always true [knownConditionTrueFalse] catdoc-0.95/src/xlsparse.c:106:7: note: Assuming that condition 'reclen' is not redundant catdoc-0.95/src/xlsparse.c:106:49: note: Condition 'reclen>0' is always true catdoc-0.95/src/xlsparse.c:262:38: style: Condition 'string_no<0' is always false [knownConditionTrueFalse] catdoc-0.95/src/xlsparse.c:253:25: note: Assignment 'string_no=getshort(rec,6)', assigned value is greater than -1 catdoc-0.95/src/xlsparse.c:254:7: note: Assuming condition is false catdoc-0.95/src/xlsparse.c:262:38: note: Condition 'string_no<0' is always false catdoc-0.95/src/xlsparse.c:519:5: error: Common realloc mistake: 'dest' nulled but not freed upon failure [memleakOnRealloc] catdoc-0.95/src/xlsparse.c:273:5: warning: If memory allocation fails, then there is a possible null pointer dereference: *pcell [nullPointerOutOfMemory] catdoc-0.95/src/xlsparse.c:272:17: note: Assuming allocation function fails catdoc-0.95/src/xlsparse.c:272:17: note: Assignment '*pcell=malloc(1)', assigned value is 0 catdoc-0.95/src/xlsparse.c:273:5: note: Null pointer dereference catdoc-0.95/src/xlsparse.c:148:3: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] catdoc-0.95/src/xlsparse.c:746:26: style:inconclusive: Function 'float2date' argument 1 names different: declaration 'd' definition 'f'. [funcArgNamesDifferent] catdoc-0.95/src/xlsparse.c:669:26: note: Function 'float2date' argument 1 names different: declaration 'd' definition 'f'. catdoc-0.95/src/xlsparse.c:746:26: note: Function 'float2date' argument 1 names different: declaration 'd' definition 'f'. catdoc-0.95/src/xlsparse.c:35:33: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] catdoc-0.95/src/xlsparse.c:346:10: style: Variable 'buf' can be declared as const array [constVariable] catdoc-0.95/src/xlsparse.c:430:23: style: Variable 'c' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/xlsparse.c:561:15: style: Variable 'formats' can be declared as const array [constVariable] catdoc-0.95/src/xlsparse.c:676:8: style: Variable 'datefmt' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/xlsparse.c:689:20: style: Variable 's' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/xlsparse.c:723:21: style: Variable 's' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/xlsparse.c:761:17: style: Variable 'barrier' can be declared as pointer to const [constVariablePointer] catdoc-0.95/src/xlsparse.c:37:24: style: Variable 'build_year' is assigned a value that is never used. [unreadVariable] catdoc-0.95/src/xlsparse.c:37:36: style: Variable 'build_rel' is assigned a value that is never used. [unreadVariable] catdoc-0.95/src/numutils.c:15:29: error: Null pointer dereference: buffer [ctunullpointer] catdoc-0.95/src/xlsparse.c:94:16: note: Calling function process_item, 3rd argument is null catdoc-0.95/src/xlsparse.c:155:12: note: Calling function getshort, 1st argument is null catdoc-0.95/src/numutils.c:15:29: note: Dereferencing argument buffer that is null diff: head catdoc-0.95/src/ole.c:422:20: style:inconclusive: Function 'ole_open' argument 1 names different: declaration '' definition 'stream'. [funcArgNamesDifferentUnnamed] head catdoc-0.95/src/ole.c:558:21: style:inconclusive: Function 'ole_close' argument 1 names different: declaration '' definition 'stream'. [funcArgNamesDifferentUnnamed] DONE