2025-05-06 16:21 ftp://ftp.de.debian.org/debian/pool/main/o/ocl-icd/ocl-icd_2.3.3.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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 56be00d (2025-05-06 17:27:07 +0200) count: 69 69 elapsed-time: 0.3 0.3 head-timing-info: old-timing-info: head results: ocl-icd-2.3.3/ocl_icd_loader.h:53:1: debug: Failed to parse 'typedef typeof ( clGetPlatformInfo ) * clGetPlatformInfo_fn ;'. The checking continues anyway. [simplifyTypedef] ocl-icd-2.3.3/cllayerinfo.c:15:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/cllayerinfo.c:31:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/cllayerinfo.c:37:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/cllayerinfo.c:54:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable layer_info_fn_ptr [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/libdummy_icd.c:55:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_INVALID_VALUE [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/libdummy_icd.c:183:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_INVALID_PLATFORM [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/libdummy_icd.c:241:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_SUCCESS [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_test.c:51:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_PLATFORM_VENDOR [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_test.c:91:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_SUCCESS [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_test.c:59:17: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: platform_vendor [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_test.c:56:35: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_test.c:56:21: note: Assignment 'platform_vendor=(char*)malloc(param_value_size_ret)', assigned value is 0 ocl-icd-2.3.3/ocl_test.c:59:17: note: Null pointer dereference ocl-icd-2.3.3/ocl_test.c:69:31: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: platform_vendor [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_test.c:66:37: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_test.c:66:23: note: Assignment 'platform_vendor=(char*)malloc(param_value_size_ret)', assigned value is 0 ocl-icd-2.3.3/ocl_test.c:69:31: note: Null pointer dereference ocl-icd-2.3.3/ocl_test.c:108:19: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: platforms [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_test.c:103:39: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_test.c:103:15: note: Assignment 'platforms=(cl_platform_id*)malloc(sizeof(cl_platform_id*)*num_platforms)', assigned value is 0 ocl-icd-2.3.3/ocl_test.c:108:19: note: Null pointer dereference ocl-icd-2.3.3/ocl_test.c:74:26: style: Parameter 'argv' can be declared as const array [constParameter] ocl-icd-2.3.3/ocl_test.c:103:3: warning: Size of pointer 'platforms' used instead of size of its data. [pointerSize] ocl-icd-2.3.3/libdummy_icd.c:174:10: style: Variable 'string_p' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/libdummy_icd.c:234:36: style: Parameter 'devid' can be declared as pointer to const [constParameterPointer] ocl-icd-2.3.3/libdummy_icd.c:240:8: style: Variable 'ENVNAME' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/libdummy_icd.c:256:9: style: Variable 'strnb' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/ocl_icd_loader.c:1228:43: debug: Function::addArguments found argument 'pfn_notify' with varid 0. [varid0] ocl-icd-2.3.3/ocl_icd_loader.c:1238:38: debug: Function::addArguments found argument 'pfn_notify' with varid 0. [varid0] ocl-icd-2.3.3/ocl_icd_loader.c:1286:55: debug: Function::addArguments found argument 'pfn_notify' with varid 0. [varid0] ocl-icd-2.3.3/ocl_icd_loader.c:1295:50: debug: Function::addArguments found argument 'pfn_notify' with varid 0. [varid0] ocl-icd-2.3.3/ocl_test_icdl.c:87:5: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: param_value [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_test_icdl.c:87:5: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_test_icdl.c:87:5: note: Assignment 'param_value=(char*)malloc(param_value_size_ret)', assigned value is 0 ocl-icd-2.3.3/ocl_test_icdl.c:87:5: note: Null pointer dereference ocl-icd-2.3.3/ocl_test_icdl.c:88:5: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: param_value [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_test_icdl.c:88:5: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_test_icdl.c:88:5: note: Assignment 'param_value=(char*)malloc(param_value_size_ret)', assigned value is 0 ocl-icd-2.3.3/ocl_test_icdl.c:88:5: note: Null pointer dereference ocl-icd-2.3.3/ocl_test_icdl.c:89:5: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: param_value [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_test_icdl.c:89:5: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_test_icdl.c:89:5: note: Assignment 'param_value=(char*)malloc(param_value_size_ret)', assigned value is 0 ocl-icd-2.3.3/ocl_test_icdl.c:89:5: note: Null pointer dereference ocl-icd-2.3.3/ocl_test_icdl.c:90:5: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: param_value [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_test_icdl.c:90:5: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_test_icdl.c:90:5: note: Assignment 'param_value=(char*)malloc(param_value_size_ret)', assigned value is 0 ocl-icd-2.3.3/ocl_test_icdl.c:90:5: note: Null pointer dereference ocl-icd-2.3.3/run_dummy_icd.c:54:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cl_platform_id [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/run_dummy_icd.c:63:24: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: platforms [nullPointerOutOfMemory] ocl-icd-2.3.3/run_dummy_icd.c:54:37: note: Assuming allocation function fails ocl-icd-2.3.3/run_dummy_icd.c:54:37: note: Assignment 'platforms=malloc(sizeof(cl_platform_id)*num_platforms)', assigned value is 0 ocl-icd-2.3.3/run_dummy_icd.c:63:24: note: Null pointer dereference ocl-icd-2.3.3/run_dummy_icd.c:65:24: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: platforms [nullPointerOutOfMemory] ocl-icd-2.3.3/run_dummy_icd.c:54:37: note: Assuming allocation function fails ocl-icd-2.3.3/run_dummy_icd.c:54:37: note: Assignment 'platforms=malloc(sizeof(cl_platform_id)*num_platforms)', assigned value is 0 ocl-icd-2.3.3/run_dummy_icd.c:65:24: note: Null pointer dereference ocl-icd-2.3.3/run_dummy_icd.c:68:17: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: platform_vendor [nullPointerOutOfMemory] ocl-icd-2.3.3/run_dummy_icd.c:64:38: note: Assuming allocation function fails ocl-icd-2.3.3/run_dummy_icd.c:64:24: note: Assignment 'platform_vendor=(char*)malloc(param_value_size_ret)', assigned value is 0 ocl-icd-2.3.3/run_dummy_icd.c:68:17: note: Null pointer dereference ocl-icd-2.3.3/ocl_icd_loader.c:218:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable dl_handle [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:333:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_SUCCESS [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:360:61: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_DEVICE_TYPE_GPU [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:447:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable dl_handle [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:659:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable clGetLayerInfo_ptr [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:732:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETC_OPENCL_LAYERS [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:851:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETC_OPENCL_VENDORS [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1051:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable OCL_ICD_OPENCL_VERSION [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1114:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable function_description [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1123:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable function_description [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1154:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_INVALID_VALUE [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1165:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_INVALID_VALUE [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1231:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_CONTEXT_PLATFORM [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1247:51: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pfn_notify [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1289:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_CONTEXT_PLATFORM [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1303:59: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pfn_notify [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1337:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_CONTEXT_PLATFORM [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1354:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_CONTEXT_PLATFORM [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1369:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_INVALID_VALUE [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1379:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_INVALID_VALUE [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1388:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_SUCCESS [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:1396:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CL_SUCCESS [valueFlowBailoutIncompleteVar] ocl-icd-2.3.3/ocl_icd_loader.c:190:15: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] ocl-icd-2.3.3/ocl_icd_loader.c:280:15: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] ocl-icd-2.3.3/ocl_icd_loader.c:768:15: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] ocl-icd-2.3.3/ocl_icd_loader.c:321:7: error: Common realloc mistake: '_picds' nulled but not freed upon failure [memleakOnRealloc] ocl-icd-2.3.3/ocl_icd_loader.c:923:5: error: Common realloc mistake: '_icds' nulled but not freed upon failure [memleakOnRealloc] ocl-icd-2.3.3/ocl_icd_loader.c:243:19: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: lib_path [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_icd_loader.c:235:22: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_icd_loader.c:235:22: note: Assignment 'lib_path=malloc(lib_path_length*sizeof(char))', assigned value is 0 ocl-icd-2.3.3/ocl_icd_loader.c:243:19: note: Null pointer dereference ocl-icd-2.3.3/ocl_icd_loader.c:258:15: warning: If memory allocation fails, then there is a possible null pointer dereference: lib_path [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_icd_loader.c:257:20: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_icd_loader.c:257:20: note: Assignment 'lib_path=malloc(lib_path_length*sizeof(char))', assigned value is 0 ocl-icd-2.3.3/ocl_icd_loader.c:258:15: note: Null pointer dereference ocl-icd-2.3.3/ocl_icd_loader.c:266:29: warning: If memory allocation fails, then there is a possible null pointer dereference: lib_path [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_icd_loader.c:257:20: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_icd_loader.c:257:20: note: Assignment 'lib_path=malloc(lib_path_length*sizeof(char))', assigned value is 0 ocl-icd-2.3.3/ocl_icd_loader.c:260:11: note: Assuming condition is false ocl-icd-2.3.3/ocl_icd_loader.c:266:29: note: Null pointer dereference ocl-icd-2.3.3/ocl_icd_loader.c:268:7: warning: If memory allocation fails, then there is a possible null pointer dereference: lib_path [nullPointerOutOfMemory] ocl-icd-2.3.3/ocl_icd_loader.c:257:20: note: Assuming allocation function fails ocl-icd-2.3.3/ocl_icd_loader.c:257:20: note: Assignment 'lib_path=malloc(lib_path_length*sizeof(char))', assigned value is 0 ocl-icd-2.3.3/ocl_icd_loader.c:260:11: note: Assuming condition is false ocl-icd-2.3.3/ocl_icd_loader.c:268:7: note: Null pointer dereference ocl-icd-2.3.3/ocl_icd_loader.c:189:18: style: Variable 'ent' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/ocl_icd_loader.c:231:10: style: Variable 'err' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/ocl_icd_loader.c:279:18: style: Variable 'ent' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/ocl_icd_loader.c:400:9: style: Variable 'ocl_sort' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/ocl_icd_loader.c:639:32: style: Parameter 'layer_path' can be declared as pointer to const [constParameterPointer] ocl-icd-2.3.3/ocl_icd_loader.c:728:18: style: Variable 'ent' can be declared as pointer to const [constVariablePointer] ocl-icd-2.3.3/ocl_icd_loader.c:788:12: style: Variable 'err' can be declared as pointer to const [constVariablePointer] diff: DONE