2025-05-05 06:17 ftp://ftp.de.debian.org/debian/pool/main/k/kanshi/kanshi_1.5.1.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-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: 88ef81e (2025-05-02 08:42:38 +0200) count: 67 67 elapsed-time: 0.4 0.3 head-timing-info: old-timing-info: head results: kanshi-1.5.1/ctl.c:14:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ctl.c:25:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ctl.c:39:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFL [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ctl.c:62:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ctl.c:81:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] kanshi-1.5.1/event-loop.c:18:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFL [valueFlowBailoutIncompleteVar] kanshi-1.5.1/event-loop.c:80:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ipc-addr.c:11:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ipc.c:70:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFD [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ipc.c:88:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] kanshi-1.5.1/ipc.c:58:6: style: Condition '!found' is always true [knownConditionTrueFalse] kanshi-1.5.1/ipc.c:51:15: note: Assignment 'found=false', assigned value is 0 kanshi-1.5.1/ipc.c:53:43: note: Assuming condition is false kanshi-1.5.1/ipc.c:58:6: note: Condition '!found' is always true kanshi-1.5.1/main.c:100:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_SETMASK [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:145:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:164:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:180:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:253:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:428:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:546:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:591:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable name [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:621:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:661:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:694:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] kanshi-1.5.1/main.c:234:8: style: Condition '!last_match' is always true [knownConditionTrueFalse] kanshi-1.5.1/main.c:221:35: note: Assignment 'last_match=NULL', assigned value is 0 kanshi-1.5.1/main.c:225:28: note: Assuming condition is false kanshi-1.5.1/main.c:234:8: note: Condition '!last_match' is always true kanshi-1.5.1/main.c:256:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pending [nullPointerOutOfMemory] kanshi-1.5.1/main.c:255:49: note: Assuming allocation function fails kanshi-1.5.1/main.c:255:49: note: Assignment 'pending=calloc(1,sizeof(*pending))', assigned value is 0 kanshi-1.5.1/main.c:256:2: note: Null pointer dereference kanshi-1.5.1/main.c:257:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pending [nullPointerOutOfMemory] kanshi-1.5.1/main.c:255:49: note: Assuming allocation function fails kanshi-1.5.1/main.c:255:49: note: Assignment 'pending=calloc(1,sizeof(*pending))', assigned value is 0 kanshi-1.5.1/main.c:257:2: note: Null pointer dereference kanshi-1.5.1/main.c:258:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pending [nullPointerOutOfMemory] kanshi-1.5.1/main.c:255:49: note: Assuming allocation function fails kanshi-1.5.1/main.c:255:49: note: Assignment 'pending=calloc(1,sizeof(*pending))', assigned value is 0 kanshi-1.5.1/main.c:258:2: note: Null pointer dereference kanshi-1.5.1/main.c:259:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pending [nullPointerOutOfMemory] kanshi-1.5.1/main.c:255:49: note: Assuming allocation function fails kanshi-1.5.1/main.c:255:49: note: Assignment 'pending=calloc(1,sizeof(*pending))', assigned value is 0 kanshi-1.5.1/main.c:259:2: note: Null pointer dereference kanshi-1.5.1/main.c:260:2: warning: If memory allocation fails, then there is a possible null pointer dereference: pending [nullPointerOutOfMemory] kanshi-1.5.1/main.c:255:49: note: Assuming allocation function fails kanshi-1.5.1/main.c:255:49: note: Assignment 'pending=calloc(1,sizeof(*pending))', assigned value is 0 kanshi-1.5.1/main.c:260:2: note: Null pointer dereference kanshi-1.5.1/main.c:401:2: warning: If memory allocation fails, then there is a possible null pointer dereference: mode [nullPointerOutOfMemory] kanshi-1.5.1/main.c:400:35: note: Assuming allocation function fails kanshi-1.5.1/main.c:400:35: note: Assignment 'mode=calloc(1,sizeof(*mode))', assigned value is 0 kanshi-1.5.1/main.c:401:2: note: Null pointer dereference kanshi-1.5.1/main.c:402:2: warning: If memory allocation fails, then there is a possible null pointer dereference: mode [nullPointerOutOfMemory] kanshi-1.5.1/main.c:400:35: note: Assuming allocation function fails kanshi-1.5.1/main.c:400:35: note: Assignment 'mode=calloc(1,sizeof(*mode))', assigned value is 0 kanshi-1.5.1/main.c:402:2: note: Null pointer dereference kanshi-1.5.1/main.c:518:2: warning: If memory allocation fails, then there is a possible null pointer dereference: head [nullPointerOutOfMemory] kanshi-1.5.1/main.c:517:35: note: Assuming allocation function fails kanshi-1.5.1/main.c:517:35: note: Assignment 'head=calloc(1,sizeof(*head))', assigned value is 0 kanshi-1.5.1/main.c:518:2: note: Null pointer dereference kanshi-1.5.1/main.c:519:2: warning: If memory allocation fails, then there is a possible null pointer dereference: head [nullPointerOutOfMemory] kanshi-1.5.1/main.c:517:35: note: Assuming allocation function fails kanshi-1.5.1/main.c:517:35: note: Assignment 'head=calloc(1,sizeof(*head))', assigned value is 0 kanshi-1.5.1/main.c:519:2: note: Null pointer dereference kanshi-1.5.1/main.c:520:2: warning: If memory allocation fails, then there is a possible null pointer dereference: head [nullPointerOutOfMemory] kanshi-1.5.1/main.c:517:35: note: Assuming allocation function fails kanshi-1.5.1/main.c:517:35: note: Assignment 'head=calloc(1,sizeof(*head))', assigned value is 0 kanshi-1.5.1/main.c:520:2: note: Null pointer dereference kanshi-1.5.1/main.c:26:64: style: Parameter 'output' can be declared as pointer to const [constParameterPointer] kanshi-1.5.1/main.c:419:31: style: Parameter 'wlr_mode' can be declared as pointer to const. However it seems that 'head_handle_current_mode' is a callback function, if 'wlr_mode' is declared with const you might also need to cast function pointer(s). [constParameterCallback] kanshi-1.5.1/main.c:501:18: note: You might need to cast the function pointer here kanshi-1.5.1/main.c:419:31: note: Parameter 'wlr_mode' can be declared as pointer to const kanshi-1.5.1/main.c:576:50: style: Parameter 'data' can be declared as pointer to const. However it seems that 'output_manager_handle_finished' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] kanshi-1.5.1/main.c:584:14: note: You might need to cast the function pointer here kanshi-1.5.1/main.c:576:50: note: Parameter 'data' can be declared as pointer to const kanshi-1.5.1/main.c:577:34: style: Parameter 'manager' can be declared as pointer to const. However it seems that 'output_manager_handle_finished' is a callback function, if 'manager' is declared with const you might also need to cast function pointer(s). [constParameterCallback] kanshi-1.5.1/main.c:584:14: note: You might need to cast the function pointer here kanshi-1.5.1/main.c:577:34: note: Parameter 'manager' can be declared as pointer to const kanshi-1.5.1/main.c:605:49: style: Parameter 'data' can be declared as pointer to const. However it seems that 'registry_handle_global_remove' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] kanshi-1.5.1/main.c:612:19: note: You might need to cast the function pointer here kanshi-1.5.1/main.c:605:49: note: Parameter 'data' can be declared as pointer to const kanshi-1.5.1/main.c:606:23: style: Parameter 'registry' can be declared as pointer to const. However it seems that 'registry_handle_global_remove' is a callback function, if 'registry' is declared with const you might also need to cast function pointer(s). [constParameterCallback] kanshi-1.5.1/main.c:612:19: note: You might need to cast the function pointer here kanshi-1.5.1/main.c:606:23: note: Parameter 'registry' can be declared as pointer to const kanshi-1.5.1/main.c:684:26: style: Parameter 'argv' can be declared as const array [constParameter] kanshi-1.5.1/parser.c:36:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:66:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:80:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:152:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KANSHI_TOKEN_LBRACKET [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:185:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:194:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:209:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:242:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:260:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:271:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WL_OUTPUT_TRANSFORM_NORMAL [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:307:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KANSHI_TOKEN_STR [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:403:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KANSHI_TOKEN_STR [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:437:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KANSHI_TOKEN_LBRACKET [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:509:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KANSHI_TOKEN_STR [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:562:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KANSHI_TOKEN_STR [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:588:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] kanshi-1.5.1/parser.c:204:22: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] kanshi-1.5.1/parser.c:205:23: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] kanshi-1.5.1/parser.c:206:24: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] kanshi-1.5.1/parser.c:238:18: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] kanshi-1.5.1/parser.c:239:18: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] kanshi-1.5.1/parser.c:308:3: error: Memory leak: output [memleak] kanshi-1.5.1/parser.c:428:3: error: Memory leak: profile [memleak] kanshi-1.5.1/parser.c:316:4: error: Memory leak: output.name [memleak] kanshi-1.5.1/parser.c:438:4: error: Memory leak: profile.name [memleak] kanshi-1.5.1/parser.c:461:4: error: Memory leak: profile.name [memleak] kanshi-1.5.1/parser.c:418:2: warning: If memory allocation fails, then there is a possible null pointer dereference: command [nullPointerOutOfMemory] kanshi-1.5.1/parser.c:417:49: note: Assuming allocation function fails kanshi-1.5.1/parser.c:417:49: note: Assignment 'command=calloc(1,sizeof(*command))', assigned value is 0 kanshi-1.5.1/parser.c:418:2: note: Null pointer dereference diff: DONE