2025-05-09 03:34 ftp://ftp.de.debian.org/debian/pool/main/a/a2ps/a2ps_4.15.6.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --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-59-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.17.0 head-info: 66c9938 (2025-05-08 13:55:11 +0200) count: 558 549 elapsed-time: 115.1 119.4 head-timing-info: old-timing-info: head results: a2ps-4.15.6/lib/argmatch.c:165:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/gettext.h:247:16: error: Returning pointer to local variable 'msg_ctxt_id' that will be invalid when returning. [returnDanglingLifetime] a2ps-4.15.6/lib/gettext.h:239:15: note: Array decayed to pointer here. a2ps-4.15.6/lib/gettext.h:226:8: note: Variable created here. a2ps-4.15.6/lib/gettext.h:247:16: note: Returning pointer to local variable 'msg_ctxt_id' that will be invalid when returning. a2ps-4.15.6/lib/openat.h:29:0: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/openat.h:29:3: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/xalloc.h:29:0: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/xalloc.h:29:3: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/ialloc.h:28:0: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/ialloc.h:28:3: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/basename-lgpl.c:59:5: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] a2ps-4.15.6/lib/c-ctype.h:27:0: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/c-ctype.h:27:3: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/calloc.c:41:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PTRDIFF_MAX [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/canonicalize-lgpl.c:441:1: error: There is an unknown macro here somewhere. Configuration is required. If libc_hidden_def is a macro then please configure it. [unknownMacro] a2ps-4.15.6/lib/chdir-long.c:32:0: error: #error "compile this file only if your system defines PATH_MAX" [preprocessorErrorDirective] a2ps-4.15.6/lib/chdir-long.c:32:3: error: #error "compile this file only if your system defines PATH_MAX" [preprocessorErrorDirective] a2ps-4.15.6/lib/cloexec.c:62:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/cloexec.c:82:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_DUPFD_CLOEXEC [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/closedir.c:58:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INVALID_HANDLE_VALUE [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/dirfd.c:84:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/dirname-lgpl.c:38:35: style: Condition 'prefix_length!=0' is always false [knownConditionTrueFalse] a2ps-4.15.6/lib/dirname-lgpl.c:34:26: note: Assignment 'prefix_length=((void)(file),0)', assigned value is 0 a2ps-4.15.6/lib/dirname-lgpl.c:38:35: note: Condition 'prefix_length!=0' is always false a2ps-4.15.6/lib/dup-safer-flag.c:36:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CLOEXEC [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/dup-safer.c:33:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_DUPFD [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/dup2.c:182:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/error.c:140:0: error: #error Please port fcntl to your platform [preprocessorErrorDirective] a2ps-4.15.6/lib/error.c:140:5: error: #error Please port fcntl to your platform [preprocessorErrorDirective] a2ps-4.15.6/lib/fchdir.c:139:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/fchdir.c:163:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/fchdir.c:190:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/fcntl.c:437:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/fcntl.c:492:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CLOEXEC [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/fd-safer-flag.c:45:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/fd-safer.c:42:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/free.c:41:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/stat-time.h:30:0: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/stat-time.h:30:3: error: #error "Please include config.h first." [preprocessorErrorDirective] a2ps-4.15.6/lib/getcwd-lgpl.c:56:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/getdtablesize.c:114:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RLIMIT_NOFILE [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/getprogname.c:289:0: error: #error "getprogname module not ported to this OS" [preprocessorErrorDirective] a2ps-4.15.6/lib/getprogname.c:289:4: error: #error "getprogname module not ported to this OS" [preprocessorErrorDirective] a2ps-4.15.6/lib/hard-locale.c:30:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SETLOCALE_NULL_MAX [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/localcharset.c:1088:14: style: Condition 'locale==NULL' is always true [knownConditionTrueFalse] a2ps-4.15.6/lib/localcharset.c:1079:24: note: Assignment 'locale=NULL', assigned value is 0 a2ps-4.15.6/lib/localcharset.c:1088:14: note: Condition 'locale==NULL' is always true a2ps-4.15.6/lib/localcharset.c:579:14: style: struct member 'table_entry::locale' is never used. [unusedStructMember] a2ps-4.15.6/lib/localcharset.c:580:14: style: struct member 'table_entry::canonical' is never used. [unusedStructMember] a2ps-4.15.6/lib/localcharset.c:1097:22: style: Variable 'locale' is assigned a value that is never used. [unreadVariable] a2ps-4.15.6/lib/malloc.c:37:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PTRDIFF_MAX [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/malloc/scratch_buffer_grow.c:40:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/malloc/scratch_buffer_grow_preserve.c:49:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/malloc/scratch_buffer_set_array_size.c:41:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/obstack.c:339:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/obstack.c:138:35: error: Pointer addition with NULL pointer. [nullPointerArithmetic] a2ps-4.15.6/lib/obstack.c:208:5: error: Pointer addition with NULL pointer. [nullPointerArithmetic] a2ps-4.15.6/lib/obstack.c:218:14: error: Pointer addition with NULL pointer. [nullPointerArithmetic] a2ps-4.15.6/lib/obstack.c:240:48: style: Parameter 'obj' can be declared as pointer to const [constParameterPointer] a2ps-4.15.6/lib/open-safer.c:33:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CREAT [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/open.c:72:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CREAT [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/openat-proc.c:82:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_SEARCH [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/openat-safer.c:33:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CREAT [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/opendir.c:87:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_PATH [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/opendirat.c:38:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/pipe-safer.c:41:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/pipe.c:48:0: error: #error "This platform lacks a pipe function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib." [preprocessorErrorDirective] a2ps-4.15.6/lib/pipe.c:48:3: error: #error "This platform lacks a pipe function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib." [preprocessorErrorDirective] a2ps-4.15.6/lib/rawmemchr.c:37:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable UINTPTR_WIDTH [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/rawmemchr.c:109:16: style: Variable 's' is reassigned a value before the old one has been used. [redundantAssignment] a2ps-4.15.6/lib/rawmemchr.c:50:36: note: s is assigned a2ps-4.15.6/lib/rawmemchr.c:109:16: note: s is overwritten a2ps-4.15.6/lib/rawmemchr.c:109:16: style: Variable 's' is assigned a value that is never used. [unreadVariable] a2ps-4.15.6/lib/readdir.c:62:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/readlink.c:41:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/realloc.c:49:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PTRDIFF_MAX [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/reallocarray.c:32:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/rename.c:289:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _GL_UNUSED [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/rename.c:467:2: style: Label 'out' is not used. [unusedLabel] a2ps-4.15.6/lib/renameatu.c:35:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/renameatu.c:55:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/renameatu.c:103:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINVAL [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/renameatu.c:113:7: style: Condition '!(ret_val<0&&(err==EINVAL||err==ENOSYS||err==ENOTSUP))' is always false [knownConditionTrueFalse] a2ps-4.15.6/lib/renameatu.c:102:18: note: Assignment 'ret_val=-1', assigned value is -1 a2ps-4.15.6/lib/renameatu.c:113:7: note: Condition '!(ret_val<0&&(err==EINVAL||err==ENOSYS||err==ENOTSUP))' is always false a2ps-4.15.6/lib/renameatu.c:113:18: style: Condition 'ret_val<0' is always true [knownConditionTrueFalse] a2ps-4.15.6/lib/renameatu.c:102:18: note: Assignment 'ret_val=-1', assigned value is -1 a2ps-4.15.6/lib/renameatu.c:113:18: note: Condition 'ret_val<0' is always true a2ps-4.15.6/lib/renameatu.c:113:30: style: The comparison 'err == EINVAL' is always true because 'err' and 'EINVAL' represent the same value. [knownConditionTrueFalse] a2ps-4.15.6/lib/renameatu.c:103:13: note: 'err' is assigned value 'EINVAL' here. a2ps-4.15.6/lib/renameatu.c:113:30: note: The comparison 'err == EINVAL' is always true because 'err' and 'EINVAL' represent the same value. a2ps-4.15.6/lib/rmdir.c:46:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/save-cwd.c:65:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_SEARCH [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/setlocale_null.c:150:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINVAL [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/setlocale_null.c:317:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] a2ps-4.15.6/lib/sig2str.c:345:28: warning: Logical conjunction always evaluates to false: rtmin <= signum && signum <= rtmax. [incorrectLogicOperator] a2ps-4.15.6/lib/sig2str.c:297:15: style: Condition '0