libftdi-1.5-13.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
libftdi-1.5-build/libftdi1-1.5/ftdi_eeprom/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def2]
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:3969:59: warning[unix.MallocSizeof]: Result of 'malloc' is converted to a pointer of type 'unsigned char', which is incompatible with sizeof operand type 'char'
# 3967|     }
# 3968|     arg1 = (struct ftdi_context *)(argp1);
# 3969|->   arg3 = PyInt_AsLong(swig_obj[1]);arg2 = (unsigned char*)malloc(arg3*sizeof(char)); 
# 3970|     result = (int)ftdi_read_data(arg1,arg2,arg3);
# 3971|     resultobj = SWIG_From_int((int)(result));

Error: CLANG_WARNING: [#def3]
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:4226:59: warning[unix.MallocSizeof]: Result of 'malloc' is converted to a pointer of type 'unsigned char', which is incompatible with sizeof operand type 'char'
# 4224|     }
# 4225|     arg1 = (struct ftdi_context *)(argp1);
# 4226|->   arg3 = PyInt_AsLong(swig_obj[1]);arg2 = (unsigned char*)malloc(arg3*sizeof(char)); 
# 4227|     result = (int)ftdi_get_eeprom_buf(arg1,arg2,arg3);
# 4228|     resultobj = SWIG_From_int((int)(result));

Error: COMPILER_WARNING (CWE-477): [#def4]
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c: scope_hint: In function ‘_wrap_usb_purge_rx_buffer’
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7516:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_rx_buffer’ is deprecated
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:3672: included_from: Included from here.
libftdi-1.5-build/libftdi1-1.5/src/ftdi.h:564:20: note: declared here
libftdi-1.5-build/libftdi1-1.5/src/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
# 7514|     }
# 7515|     arg1 = (struct ftdi_context *)(argp1);
# 7516|->   result = (int)ftdi_usb_purge_rx_buffer(arg1);
# 7517|     resultobj = SWIG_From_int((int)(result));
# 7518|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def5]
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c: scope_hint: In function ‘_wrap_usb_purge_tx_buffer’
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7540:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_tx_buffer’ is deprecated
libftdi-1.5-build/libftdi1-1.5/src/ftdi.h:565:20: note: declared here
libftdi-1.5-build/libftdi1-1.5/src/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
# 7538|     }
# 7539|     arg1 = (struct ftdi_context *)(argp1);
# 7540|->   result = (int)ftdi_usb_purge_tx_buffer(arg1);
# 7541|     resultobj = SWIG_From_int((int)(result));
# 7542|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def6]
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c: scope_hint: In function ‘_wrap_usb_purge_buffers’
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7564:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_buffers’ is deprecated
libftdi-1.5-build/libftdi1-1.5/src/ftdi.h:566:20: note: declared here
libftdi-1.5-build/libftdi1-1.5/src/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
# 7562|     }
# 7563|     arg1 = (struct ftdi_context *)(argp1);
# 7564|->   result = (int)ftdi_usb_purge_buffers(arg1);
# 7565|     resultobj = SWIG_From_int((int)(result));
# 7566|     return resultobj;

Error: CLANG_WARNING: [#def7]
libftdi-1.5-build/libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:11743:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'result'
#11741|     if (!SWIG_Python_UnpackTuple(args, "new_eeprom", 0, 0, 0)) SWIG_fail;
#11742|     result = (struct ftdi_eeprom *)calloc(1, sizeof(struct ftdi_eeprom));
#11743|->   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ftdi_eeprom, SWIG_POINTER_NEW |  0 );
#11744|     return resultobj;
#11745|   fail:

Error: CPPCHECK_WARNING: [#def8]
libftdi-1.5-build/libftdi1-1.5/src/ftdi.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
libftdi-1.5-build/libftdi1-1.5/src/ftdi_stream.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-212.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibftdi-1.5-13.fc41
store-results-to/tmp/tmpbfkez1_n/libftdi-1.5-13.fc41.tar.xz
time-created2024-07-03 14:50:51
time-finished2024-07-03 14:52:31
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpbfkez1_n/libftdi-1.5-13.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpbfkez1_n/libftdi-1.5-13.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9