2026-05-04 22:38 ftp://ftp.de.debian.org/debian/pool/main/r/ruby-rpatricia/ruby-rpatricia_1.0.1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=ruby --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-1047-aws-aarch64-with-glibc2.35 python: 3.10.12 client-version: 1.4.0 compiler: g++ (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0 cppcheck: head 2.20.0 head-info: 519958a (2026-05-04 15:03:10 +0200) count: 57 57 elapsed-time: 0.4 0.3 head-timing-info: old-timing-info: head results: rpatricia-1.0.1/ext/rpatricia/patricia.c:97:62: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INET6_ADDRSTRLEN [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/patricia.c:122:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable in6_addr [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/patricia.c:161:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INET6_ADDRSTRLEN [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/patricia.c:137:5: warning: If memory allocation fails, then there is a possible null pointer dereference: prefix [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:136:17: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:136:17: note: Assignment 'prefix=calloc(1,size)', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:137:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:138:5: warning: If memory allocation fails, then there is a possible null pointer dereference: prefix [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:136:17: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:136:17: note: Assignment 'prefix=calloc(1,size)', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:138:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:139:5: warning: If memory allocation fails, then there is a possible null pointer dereference: prefix [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:136:17: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:136:17: note: Assignment 'prefix=calloc(1,size)', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:139:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:235:5: warning: If memory allocation fails, then there is a possible null pointer dereference: patricia [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:233:39: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:233:39: note: Assignment 'patricia=calloc(1,sizeof(*patricia))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:235:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:236:5: warning: If memory allocation fails, then there is a possible null pointer dereference: patricia [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:233:39: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:233:39: note: Assignment 'patricia=calloc(1,sizeof(*patricia))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:236:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:237:5: warning: If memory allocation fails, then there is a possible null pointer dereference: patricia [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:233:39: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:233:39: note: Assignment 'patricia=calloc(1,sizeof(*patricia))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:237:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:459:2: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assignment 'node=calloc(1,sizeof(*node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:459:2: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:460:2: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assignment 'node=calloc(1,sizeof(*node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:460:2: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:461:2: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assignment 'node=calloc(1,sizeof(*node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:461:2: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:462:2: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assignment 'node=calloc(1,sizeof(*node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:462:2: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:462:12: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assignment 'node=calloc(1,sizeof(*node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:462:12: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:463:2: warning: If memory allocation fails, then there is a possible null pointer dereference: node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:458:15: note: Assignment 'node=calloc(1,sizeof(*node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:463:2: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:530:5: warning: If memory allocation fails, then there is a possible null pointer dereference: new_node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assignment 'new_node=calloc(1,sizeof(*new_node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:530:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:531:5: warning: If memory allocation fails, then there is a possible null pointer dereference: new_node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assignment 'new_node=calloc(1,sizeof(*new_node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:531:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:532:5: warning: If memory allocation fails, then there is a possible null pointer dereference: new_node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assignment 'new_node=calloc(1,sizeof(*new_node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:532:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:533:5: warning: If memory allocation fails, then there is a possible null pointer dereference: new_node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assignment 'new_node=calloc(1,sizeof(*new_node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:533:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:533:19: warning: If memory allocation fails, then there is a possible null pointer dereference: new_node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assignment 'new_node=calloc(1,sizeof(*new_node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:533:19: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:534:5: warning: If memory allocation fails, then there is a possible null pointer dereference: new_node [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:529:22: note: Assignment 'new_node=calloc(1,sizeof(*new_node))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:534:5: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:574:9: warning: If memory allocation fails, then there is a possible null pointer dereference: glue [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assignment 'glue=calloc(1,sizeof(*glue))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:574:9: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:575:9: warning: If memory allocation fails, then there is a possible null pointer dereference: glue [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assignment 'glue=calloc(1,sizeof(*glue))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:575:9: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:576:9: warning: If memory allocation fails, then there is a possible null pointer dereference: glue [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assignment 'glue=calloc(1,sizeof(*glue))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:576:9: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:577:9: warning: If memory allocation fails, then there is a possible null pointer dereference: glue [nullPointerOutOfMemory] rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assuming allocation function fails rpatricia-1.0.1/ext/rpatricia/patricia.c:573:22: note: Assignment 'glue=calloc(1,sizeof(*glue))', assigned value is 0 rpatricia-1.0.1/ext/rpatricia/patricia.c:577:9: note: Null pointer dereference rpatricia-1.0.1/ext/rpatricia/patricia.c:63:16: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] rpatricia-1.0.1/ext/rpatricia/patricia.c:114:32: style: Parameter 'dest' can be declared as pointer to const [constParameterPointer] rpatricia-1.0.1/ext/rpatricia/patricia.c:116:15: style: Variable 'orig_prefix' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/patricia.c:159:11: style: Variable 'slash' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/patricia.c:344:13: style: Variable 'addr' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/patricia.c:388:13: style: Variable 'addr' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/patricia.c:449:13: style: Variable 'addr' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/patricia.c:449:20: style: Variable 'test_addr' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/patricia.c:157:12: style: Unused variable: maxbitlen [unusedVariable] rpatricia-1.0.1/ext/rpatricia/patricia.c:158:11: style: Unused variable: dest [unusedVariable] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:29:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Qtrue [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:57:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rb_eArgError [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:73:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Qnil [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:107:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Qtrue [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:124:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Qnil [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:138:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Qfalse [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:152:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Qnil [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:191:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rb_stdout [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:219:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INET6_ADDRSTRLEN [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:239:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T_STRING [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:249:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INET6_ADDRSTRLEN [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:263:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INET6_ADDRSTRLEN [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:327:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rb_eArgError [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:351:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T_STRING [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:372:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Qnil [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:378:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rb_cObject [valueFlowBailoutIncompleteVar] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:41:28: style: Parameter 'orig' can be declared as pointer to const [constParameterPointer] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:54:13: style: Variable 'ok' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:65:25: style: Parameter 'argv' can be declared as pointer to const. However it seems that 'p_add' is a callback function, if 'argv' is declared with const you might also need to cast function pointer(s). [constParameterCallback] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:391:43: note: You might need to cast the function pointer here rpatricia-1.0.1/ext/rpatricia/rpatricia.c:65:25: note: Parameter 'argv' can be declared as pointer to const rpatricia-1.0.1/ext/rpatricia/rpatricia.c:131:20: style: Variable 'node' can be declared as pointer to const [constVariablePointer] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:283:28: style: Parameter 'prefix' can be declared as pointer to const. However it seems that 'p_tree_mark_each' is a callback function, if 'prefix' is declared with const you might also need to cast function pointer(s). [constParameterCallback] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:296:28: note: You might need to cast the function pointer here rpatricia-1.0.1/ext/rpatricia/rpatricia.c:283:28: note: Parameter 'prefix' can be declared as pointer to const rpatricia-1.0.1/ext/rpatricia/rpatricia.c:283:42: style: Parameter 'data' can be declared as pointer to const. However it seems that 'p_tree_mark_each' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] rpatricia-1.0.1/ext/rpatricia/rpatricia.c:296:28: note: You might need to cast the function pointer here rpatricia-1.0.1/ext/rpatricia/rpatricia.c:283:42: note: Parameter 'data' can be declared as pointer to const diff: head rpatricia-1.0.1/ext/rpatricia/patricia.c:63:16: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] 2.20.0 rpatricia-1.0.1/ext/rpatricia/patricia.c:63:16: warning: Either the condition 'mask%8==0' is redundant or there is signed integer overflow for expression '(-1)<<(8-(mask%8))'. [integerOverflowCond] rpatricia-1.0.1/ext/rpatricia/patricia.c:65:15: note: Assuming that condition 'mask%8==0' is not redundant rpatricia-1.0.1/ext/rpatricia/patricia.c:63:16: note: Integer overflow DONE