2026-05-16 07:21 ftp://ftp.de.debian.org/debian/pool/main/p/policykit-1/policykit-1_127.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=gtk --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 -j96 platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.4.0 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0 cppcheck: head 2.20.0 head-info: 7a91746 (2026-05-15 22:45:04 +0200) count: 70 66 elapsed-time: 0.4 0.1 head-timing-info: old-timing-info: head results: polkit-127/src/examples/frobnicate.c:38:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] polkit-127/src/polkit/polkitimplicitauthorization.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitcheckauthorizationflags.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitauthorizationresult.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkiterror.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitpermission.h:24:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitsubject.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitsystembusname.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitunixgroup.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitidentity.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitunixnetgroup.h:24:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitunixsession.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitunixuser.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkit/polkitunixprocess.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkitagent/polkitagenthelper-bsdauth.c:60:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] polkit-127/src/polkitagent/polkitagenthelper-bsdauth.c:147:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] polkit-127/src/polkitagent/polkitagentlistener.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents" [preprocessorErrorDirective] polkit-127/src/polkitagent/polkitagentsession.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents" [preprocessorErrorDirective] polkit-127/src/polkitagent/polkitagenthelperprivate.c:64:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] polkit-127/src/polkitbackend/polkitbackendactionlookup.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:62:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] polkit-127/src/polkitagent/polkitagenthelperprivate.c:150:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:180:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] polkit-127/src/polkitbackend/polkitbackendactionpool.h:23:2: error: #error "This is a private header file." [preprocessorErrorDirective] polkit-127/src/polkitbackend/polkitbackendcommon.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkitagent/polkitagenthelper-bsdauth.c:95:13: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] polkit-127/src/polkitagent/polkitagenthelper-bsdauth.c:149:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] polkit-127/src/examples/cancel.c:126:7: error: Memory leak: loop [memleak] polkit-127/src/polkitagent/polkitagenthelperprivate.c:159:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] polkit-127/src/polkitbackend/polkitbackendsessionmonitor.h:23:2: error: #error "This is a private header file." [preprocessorErrorDirective] polkit-127/src/examples/cancel.c:51:14: style: Variable 'loop' can be declared as pointer to const [constVariablePointer] polkit-127/src/examples/cancel.c:95:23: style: Parameter 'argv' can be declared as const array [constParameter] polkit-127/src/polkitagent/polkitagenthelper-bsdauth.c:45:18: style: Variable 'pw' can be declared as pointer to const [constVariablePointer] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:99:12: portability: Non reentrant function 'getspnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getspnam_r'. [prohibitedgetspnamCalled] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:182:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:193:16: portability: Non reentrant function 'crypt' called. For threadsafe applications it is recommended to use the reentrant replacement function 'crypt_r'. [prohibitedcryptCalled] polkit-127/src/polkitbackend/polkitbackendauthority.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:198:32: portability: Non reentrant function 'crypt' called. For threadsafe applications it is recommended to use the reentrant replacement function 'crypt_r'. [prohibitedcryptCalled] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:176:35: style: Parameter 'shadow' can be declared as pointer to const [constParameterPointer] polkit-127/src/polkitagent/polkitagenthelper-shadow.c:178:22: style: Variable 'crypt_pass' can be declared as pointer to const [constVariablePointer] polkit-127/src/polkitagent/polkitagenthelper-pam.c:62:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] polkit-127/src/polkitagent/polkitagenthelper-pam.c:121:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] polkit-127/src/polkitagent/polkitagenthelper-pam.c:316:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PAM_MAX_RESP_SIZE [valueFlowBailoutIncompleteVar] polkit-127/test/polkittesthelper.c:35:35: style: Parameter 'user_data' can be declared as pointer to const. However it seems that 'polkit_test_log_handler' is a callback function, if 'user_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] polkit-127/test/polkittesthelper.c:48:30: note: You might need to cast the function pointer here polkit-127/test/polkittesthelper.c:35:35: note: Parameter 'user_data' can be declared as pointer to const polkit-127/src/polkitbackend/polkitbackendinteractiveauthority.h:23:2: error: #error "Only can be included directly, this file may disappear or change contents." [preprocessorErrorDirective] polkit-127/src/programs/pkaction.c:96:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_OPTION_ARG_STRING [valueFlowBailoutIncompleteVar] polkit-127/src/programs/pkexec.c:90:1: error: There is an unknown macro here somewhere. Configuration is required. If G_GNUC_PRINTF is a macro then please configure it. [unknownMacro] polkit-127/test/polkit/polkitidentitytest.c:168:24: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] polkit-127/src/polkitbackend/polkitd.c:128:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_MAXUINT64 [valueFlowBailoutIncompleteVar] polkit-127/src/polkitbackend/polkitd.c:178:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_LEVEL_WARNING [valueFlowBailoutIncompleteVar] polkit-127/src/polkitbackend/polkitd.c:191:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_LEVEL_INFO [valueFlowBailoutIncompleteVar] polkit-127/src/polkitbackend/polkitd.c:339:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] polkit-127/src/programs/pkttyagent.c:56:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TCSADRAIN [valueFlowBailoutIncompleteVar] polkit-127/src/programs/pkttyagent.c:82:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_OPTION_ARG_NONE [valueFlowBailoutIncompleteVar] polkit-127/test/polkitbackend/test-polkitbackendjsauthority.c:51:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POLKIT_BACKEND_TYPE_JS_AUTHORITY [valueFlowBailoutIncompleteVar] polkit-127/test/polkitbackend/test-polkitbackendjsauthority.c:476:75: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POLKIT_IMPLICIT_AUTHORIZATION_UNKNOWN [valueFlowBailoutIncompleteVar] polkit-127/test/polkitbackend/test-polkitbackendjsauthority.c:505:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] polkit-127/src/programs/pkttyagent.c:268:14: portability: Non reentrant function 'ctermid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'ctermid_r'. [prohibitedctermidCalled] polkit-127/src/polkitagent/polkitagenthelper-pam.c:101:9: style: Variable 'lang' can be declared as pointer to const [constVariablePointer] polkit-127/src/polkitagent/polkitagenthelper-pam.c:102:9: style: Variable 'language' can be declared as pointer to const [constVariablePointer] polkit-127/src/programs/pkcheck.c:288:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_TIME_SPAN_SECOND [valueFlowBailoutIncompleteVar] polkit-127/src/programs/pkcheck.c:509:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_VERSION [valueFlowBailoutIncompleteVar] polkit-127/src/programs/pkttyagent.c:63:52: style: Parameter 'listener' can be declared as pointer to const. However it seems that 'tty_attrs_changed' is a callback function, if 'listener' is declared with const you might also need to cast function pointer(s). [constParameterCallback] polkit-127/src/programs/pkttyagent.c:235:3: note: You might need to cast the function pointer here polkit-127/src/programs/pkttyagent.c:63:52: note: Parameter 'listener' can be declared as pointer to const polkit-127/src/programs/pkttyagent.c:65:40: style: Parameter 'user_data' can be declared as pointer to const. However it seems that 'tty_attrs_changed' is a callback function, if 'user_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] polkit-127/src/programs/pkttyagent.c:235:3: note: You might need to cast the function pointer here polkit-127/src/programs/pkttyagent.c:65:40: note: Parameter 'user_data' can be declared as pointer to const polkit-127/src/polkitbackend/polkitd.c:247:8: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] polkit-127/src/polkitbackend/polkitd.c:375:13: style: Variable 'sigint_id' is reassigned a value before the old one has been used. [redundantAssignment] polkit-127/src/polkitbackend/polkitd.c:371:13: note: sigint_id is assigned polkit-127/src/polkitbackend/polkitd.c:375:13: note: sigint_id is overwritten polkit-127/src/polkitbackend/polkitd.c:196:29: style: Parameter 'user_data' can be declared as pointer to const. However it seems that 'on_sigint_sigterm' is a callback function, if 'user_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] polkit-127/src/polkitbackend/polkitd.c:376:34: note: You might need to cast the function pointer here polkit-127/src/polkitbackend/polkitd.c:196:29: note: Parameter 'user_data' can be declared as pointer to const polkit-127/src/programs/pkcheck.c:290:25: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] polkit-127/src/programs/pkcheck.c:292:25: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] polkit-127/src/programs/pkcheck.c:278:22: style: Variable 'broken_down' can be declared as pointer to const [constVariablePointer] diff: head polkit-127/src/programs/pkcheck.c:278:22: style: Variable 'broken_down' can be declared as pointer to const [constVariablePointer] head polkit-127/src/programs/pkcheck.c:288:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_TIME_SPAN_SECOND [valueFlowBailoutIncompleteVar] head polkit-127/src/programs/pkcheck.c:290:25: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] head polkit-127/src/programs/pkcheck.c:292:25: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] 2.20.0 polkit-127/src/programs/pkcheck.c:401:39: error: There is an unknown macro here somewhere. Configuration is required. If G_GUINT64_FORMAT is a macro then please configure it. [unknownMacro] head polkit-127/src/programs/pkcheck.c:509:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_VERSION [valueFlowBailoutIncompleteVar] DONE