libffado-2.4.9-3.fc42

List of Findings

Error: COMPILER_WARNING (CWE-563): [#def1]
libffado-2.4.9-build/libffado-2.4.9/cache/conftest_7c8d9da9f38e9e1b717729bacb3f12aa_0.c: scope_hint: In function ‘main’
libffado-2.4.9-build/libffado-2.4.9/cache/conftest_7c8d9da9f38e9e1b717729bacb3f12aa_0.c:6:3: warning[-Wunused-value]: statement with no effect
#    6 |   lrint(3.2);
#      |   ^~~~~~~~~~
#    4|   
#    5|   int main(void) {
#    6|->   lrint(3.2);
#    7|   return 0;
#    8|   }

Error: COMPILER_WARNING (CWE-563): [#def2]
libffado-2.4.9-build/libffado-2.4.9/cache/conftest_e05fedd4c0c2a154158929f57c9b4d78_0.c: scope_hint: In function ‘main’
libffado-2.4.9-build/libffado-2.4.9/cache/conftest_e05fedd4c0c2a154158929f57c9b4d78_0.c:6:3: warning[-Wunused-value]: statement with no effect
#    6 |   lrintf(3.2);
#      |   ^~~~~~~~~~~
#    4|   
#    5|   int main(void) {
#    6|->   lrintf(3.2);
#    7|   return 0;
#    8|   }

Error: COMPILER_WARNING (CWE-252): [#def3]
libffado-2.4.9-build/libffado-2.4.9/src/bebob/bebob_avdevice.cpp: scope_hint: In member function ‘virtual bool BeBoB::Device::loadFromCache()’
libffado-2.4.9-build/libffado-2.4.9/src/bebob/bebob_avdevice.cpp:838:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#  838 |     asprintf(&configId, "%016" PRIx64 "", getConfigurationId() );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  836|   
#  837|       char* configId;
#  838|->     asprintf(&configId, "%016" PRIx64 "", getConfigurationId() );
#  839|       if ( !configId ) {
#  840|           debugError( "could not create id string\n" );

Error: COMPILER_WARNING (CWE-252): [#def4]
libffado-2.4.9-build/libffado-2.4.9/src/bebob/bebob_avdevice.cpp: scope_hint: In member function ‘virtual bool BeBoB::Device::saveCache()’
libffado-2.4.9-build/libffado-2.4.9/src/bebob/bebob_avdevice.cpp:914:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#  914 |     asprintf(&configId, "%016" PRIx64 "", BeBoB::Device::getConfigurationId() );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  912|       // come up with an unique file name for the current settings
#  913|       char* configId;
#  914|->     asprintf(&configId, "%016" PRIx64 "", BeBoB::Device::getConfigurationId() );
#  915|       if ( !configId ) {
#  916|           debugError( "Could not create id string\n" );

Error: CPPCHECK_WARNING (CWE-909): [#def5]
libffado-2.4.9-build/libffado-2.4.9/src/bebob/bebob_avplug.cpp:384: error[uninitStructMember]: Uninitialized struct member: clusterInfo.m_buildSource
#  382|               clusterInfo.m_channelInfos.push_back( channelInfo );
#  383|           }
#  384|->         m_clusterInfos.push_back( clusterInfo );
#  385|       }
#  386|   

Error: CPPCHECK_WARNING (CWE-457): [#def6]
libffado-2.4.9-build/libffado-2.4.9/src/bebob/bebob_avplug.cpp:384: error[uninitvar]: Uninitialized variable: clusterInfo.m_buildSource
#  382|               clusterInfo.m_channelInfos.push_back( channelInfo );
#  383|           }
#  384|->         m_clusterInfos.push_back( clusterInfo );
#  385|       }
#  386|   

Error: COMPILER_WARNING (CWE-457): [#def7]
libffado-2.4.9-build/libffado-2.4.9/src/fireworks/efc/efc_cmds_hardware.cpp: scope_hint: In member function ‘FireWorks::EfcPolledValuesCmd::showEfcCmd()’
libffado-2.4.9-build/libffado-2.4.9/src/fireworks/efc/efc_cmds_hardware.cpp:259:18: warning[-Wmaybe-uninitialized]: ‘i’ may be used uninitialized
#  259 |         for (; i < m_nb_output_meters + m_nb_input_meters; i++)
#      |                ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libffado-2.4.9-build/libffado-2.4.9/src/fireworks/efc/efc_cmds_hardware.cpp:238:18: note: ‘i’ was declared here
#  238 |     unsigned int i;
#      |                  ^
#  257|       if (m_nb_input_meters > 0) {
#  258|           debugOutput(DEBUG_LEVEL_NORMAL, " # Input Meters  : %d\n", m_nb_input_meters);
#  259|->         for (; i < m_nb_output_meters + m_nb_input_meters; i++)
#  260|               debugOutput(DEBUG_LEVEL_NORMAL, "     Meter %d: %d\n", i, m_meters[i]);
#  261|       }

Error: CPPCHECK_WARNING (CWE-457): [#def8]
libffado-2.4.9-build/libffado-2.4.9/src/fireworks/fireworks_session_block.cpp:231: error[uninitvar]: Uninitialized variable: header
#  229|       debugOutput(DEBUG_LEVEL_VERBOSE, " Writing file header...\n");
#  230|       char header[ECHO_SESSION_FILE_START_OFFSET];
#  231|->     sessfile.write(header, ECHO_SESSION_FILE_START_OFFSET);
#  232|   
#  233|       debugOutput(DEBUG_LEVEL_VERBOSE, " Writing session data...\n");

Error: CPPCHECK_WARNING (CWE-823): [#def9]
libffado-2.4.9-build/libffado-2.4.9/src/libavc/general/avc_extended_cmd_generic.cpp:452: error[arrayIndexOutOfBounds]: Array 'plugAddressDirectionStrings[3]' accessed at index 255, which is out of bounds.
#  450|           direction = PlugAddress::ePD_Undefined;
#  451|       }
#  452|->     return plugAddressDirectionStrings[direction];
#  453|   }
#  454|   

Error: COMPILER_WARNING (CWE-252): [#def10]
libffado-2.4.9-build/libffado-2.4.9/src/libavc/general/avc_extended_plug_info.cpp: scope_hint: In member function ‘virtual bool AVC::ExtendedPlugInfoInfoType::serialize(Util::Cmd::IOSSerialize&)’
libffado-2.4.9-build/libffado-2.4.9/src/libavc/general/avc_extended_plug_info.cpp:633:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#  633 |     asprintf( &buf, "ExtendedPlugInfoInfoType infoType (%s)",
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  634 |               extendedPlugInfoInfoTypeToString( m_infoType ) );
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  631|       // XXX \todo improve Util::Cmd::IOSSerialize::write interface
#  632|       char* buf;
#  633|->     asprintf( &buf, "ExtendedPlugInfoInfoType infoType (%s)",
#  634|                 extendedPlugInfoInfoTypeToString( m_infoType ) );
#  635|       se.write( m_infoType, buf );

Error: COMPILER_WARNING (CWE-252): [#def11]
libffado-2.4.9-build/libffado-2.4.9/src/libavc/general/avc_generic.cpp: scope_hint: In member function ‘virtual bool AVC::AVCCommand::serialize(Util::Cmd::IOSSerialize&)’
libffado-2.4.9-build/libffado-2.4.9/src/libavc/general/avc_generic.cpp:62:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#   62 |     asprintf( &buf, "AVCCommand ctype ('%s')",
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   63 |               responseToString( static_cast<AVCCommand::EResponse>( m_ctype ) ) );
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   60|       // XXX \todo improve Util::Cmd::IOSSerialize::write interface
#   61|       char* buf;
#   62|->     asprintf( &buf, "AVCCommand ctype ('%s')",
#   63|                 responseToString( static_cast<AVCCommand::EResponse>( m_ctype ) ) );
#   64|       se.write( m_ctype, buf );

Error: COMPILER_WARNING (CWE-252): [#def12]
libffado-2.4.9-build/libffado-2.4.9/src/libavc/general/avc_generic.cpp:67:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#   67 |     asprintf( &buf, "AVCCommand subunit (subunit_type = %d, subunit_id = %d)",
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   68 |               getSubunitType(), getSubunitId() );
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   65|       free( buf );
#   66|   
#   67|->     asprintf( &buf, "AVCCommand subunit (subunit_type = %d, subunit_id = %d)",
#   68|                 getSubunitType(), getSubunitId() );
#   69|       se.write( m_subunit, buf );

Error: CPPCHECK_WARNING (CWE-909): [#def13]
libffado-2.4.9-build/libffado-2.4.9/src/libavc/musicsubunit/avc_musicsubunit.cpp:210: error[uninitStructMember]: Uninitialized struct member: cinfo.m_buildSource
#  208|   
#  209|           idx++;
#  210|->         plug.getClusterInfos().push_back(cinfo);
#  211|       }
#  212|   

Error: CPPCHECK_WARNING (CWE-457): [#def14]
libffado-2.4.9-build/libffado-2.4.9/src/libavc/musicsubunit/avc_musicsubunit.cpp:210: error[uninitvar]: Uninitialized variable: cinfo.m_buildSource
#  208|   
#  209|           idx++;
#  210|->         plug.getClusterInfos().push_back(cinfo);
#  211|       }
#  212|   

Error: CPPCHECK_WARNING (CWE-664): [#def15]
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/IsoHandlerManager.cpp:954: error[invalidContainer]: Using iterator to member container 'm_StreamProcessors' that may be invalid.
#  952|           if ( *it == stream ) {
#  953|               m_StreamProcessors.erase(it);
#  954|->             debugOutput( DEBUG_LEVEL_VERBOSE, " deleted stream (%p) from list...\n", *it);
#  955|               return true;
#  956|           }

Error: COMPILER_WARNING (CWE-252): [#def16]
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/configrom.cpp: scope_hint: In member function ‘const std::string ConfigRom::getGuidString() const’
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/configrom.cpp:406:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#  406 |     asprintf( &buf, "%08x%08x",
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~
#  407 |               ( unsigned int ) ( getGuid() >> 32 ),
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  408 |               ( unsigned int ) ( getGuid() & 0xffffffff ) );
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  404|   {
#  405|       char* buf;
#  406|->     asprintf( &buf, "%08x%08x",
#  407|                 ( unsigned int ) ( getGuid() >> 32 ),
#  408|                 ( unsigned int ) ( getGuid() & 0xffffffff ) );

Error: CPPCHECK_WARNING (CWE-590): [#def17]
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/csr1212.c:757: error[autovarInvalidDeallocation]: Deallocation of an auto-variable (dentry) results in undefined behaviour.
#  755|   			head->prev = NULL;
#  756|   		} else if (tail != &dentry)
#  757|-> 			CSR1212_FREE(tail);
#  758|   	}
#  759|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/csr1212.c: scope_hint: In function ‘csr1212_parse_bus_info_block’
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/csr1212.c:1294:38: warning[-Wanalyzer-malloc-leak]: leak of ‘cr’
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/csr1212.c:61: included_from: Included from here.
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/csr1212.c:1284:14: note: in expansion of macro ‘CSR1212_MALLOC’
libffado-2.4.9-build/libffado-2.4.9/src/libieee1394/csr1212.c:1284:14: note: in expansion of macro ‘CSR1212_MALLOC’
# 1292|   
# 1293|   	csr->cache_head->filled_head = cr;
# 1294|-> 	csr->cache_head->filled_tail = cr;
# 1295|   
# 1296|   	return CSR1212_SUCCESS;

Error: CPPCHECK_WARNING (CWE-909): [#def19]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp:549: error[uninitStructMember]: Uninitialized struct member: p.enabled
#  547|                   #endif
#  548|   
#  549|->                 m_audio_ports.push_back(p);
#  550|                   debugOutput(DEBUG_LEVEL_VERBOSE,
#  551|                               "Cached port %s at position %u\n",

Error: CPPCHECK_WARNING (CWE-457): [#def20]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp:549: error[uninitvar]: Uninitialized variable: p.enabled
#  547|                   #endif
#  548|   
#  549|->                 m_audio_ports.push_back(p);
#  550|                   debugOutput(DEBUG_LEVEL_VERBOSE,
#  551|                               "Cached port %s at position %u\n",

Error: CPPCHECK_WARNING (CWE-909): [#def21]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp:584: error[uninitStructMember]: Uninitialized struct member: p.enabled
#  582|               #endif
#  583|   
#  584|->             m_midi_ports.push_back(p);
#  585|               debugOutput(DEBUG_LEVEL_VERBOSE,
#  586|                           "Cached port %s at position %u, location %u\n",

Error: CPPCHECK_WARNING (CWE-457): [#def22]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp:584: error[uninitvar]: Uninitialized variable: p.enabled
#  582|               #endif
#  583|   
#  584|->             m_midi_ports.push_back(p);
#  585|               debugOutput(DEBUG_LEVEL_VERBOSE,
#  586|                           "Cached port %s at position %u, location %u\n",

Error: CPPCHECK_WARNING (CWE-909): [#def23]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp:1147: error[uninitStructMember]: Uninitialized struct member: p.enabled
# 1145|                   #endif
# 1146|   
# 1147|->                 m_audio_ports.push_back(p);
# 1148|                   debugOutput(DEBUG_LEVEL_VERBOSE,
# 1149|                               "Cached port %s at position %u\n",

Error: CPPCHECK_WARNING (CWE-457): [#def24]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp:1147: error[uninitvar]: Uninitialized variable: p.enabled
# 1145|                   #endif
# 1146|   
# 1147|->                 m_audio_ports.push_back(p);
# 1148|                   debugOutput(DEBUG_LEVEL_VERBOSE,
# 1149|                               "Cached port %s at position %u\n",

Error: CPPCHECK_WARNING (CWE-909): [#def25]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp:1182: error[uninitStructMember]: Uninitialized struct member: p.enabled
# 1180|               #endif
# 1181|   
# 1182|->             m_midi_ports.push_back(p);
# 1183|               debugOutput(DEBUG_LEVEL_VERBOSE,
# 1184|                           "Cached port %s at position %u, location %u\n",

Error: CPPCHECK_WARNING (CWE-457): [#def26]
libffado-2.4.9-build/libffado-2.4.9/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp:1182: error[uninitvar]: Uninitialized variable: p.enabled
# 1180|               #endif
# 1181|   
# 1182|->             m_midi_ports.push_back(p);
# 1183|               debugOutput(DEBUG_LEVEL_VERBOSE,
# 1184|                           "Cached port %s at position %u, location %u\n",

Error: COMPILER_WARNING (CWE-252): [#def27]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/Watchdog.cpp: scope_hint: In member function ‘void Util::Watchdog::WatchdogTask::ReqStop()’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/Watchdog.cpp:94:10: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#   94 |     write(stop_msg_pipe[1], &data, sizeof(data));
#      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   92|       signed int data = 0;
#   93|       debugOutput( DEBUG_LEVEL_VERBOSE, "(%p) watchdog %p requested to stop\n", this, &m_parent);
#   94|->     write(stop_msg_pipe[1], &data, sizeof(data));
#   95|   }
#   96|   

Error: COMPILER_WARNING (CWE-252): [#def28]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp: scope_hint: In member function ‘virtual bool Util::Cmd::StringSerializer::write(byte_t, const char*)’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp:82:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#   82 |     asprintf( &result, "  %3d:\t0x%02x\t%s\n", m_cnt, d, name );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   80|   {
#   81|       char* result;
#   82|->     asprintf( &result, "  %3d:\t0x%02x\t%s\n", m_cnt, d, name );
#   83|   
#   84|       m_string += result;

Error: COMPILER_WARNING (CWE-252): [#def29]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp: scope_hint: In member function ‘virtual bool Util::Cmd::StringSerializer::write(uint16_t, const char*)’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp:96:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#   96 |     asprintf( &result, "  %3d:\t0x%04x\t%s\n", m_cnt, d, name );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   94|   {
#   95|       char* result;
#   96|->     asprintf( &result, "  %3d:\t0x%04x\t%s\n", m_cnt, d, name );
#   97|   
#   98|       m_string += result;

Error: COMPILER_WARNING (CWE-252): [#def30]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp: scope_hint: In member function ‘virtual bool Util::Cmd::StringSerializer::write(quadlet_t, const char*)’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp:110:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#  110 |     asprintf( &result, "  %3d:\t0x%08x\t%s\n", m_cnt, d, name );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  108|   {
#  109|       char* result;
#  110|->     asprintf( &result, "  %3d:\t0x%08x\t%s\n", m_cnt, d, name );
#  111|   
#  112|       m_string += result;

Error: COMPILER_WARNING (CWE-252): [#def31]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp: scope_hint: In member function ‘virtual bool Util::Cmd::StringSerializer::write(const char*, size_t, const char*)’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/cmd_serialize.cpp:123:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#  123 |     asprintf( &result, "  %3d:\t%s\t%s\n", m_cnt, v, name );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  121|   {
#  122|       char* result;
#  123|->     asprintf( &result, "  %3d:\t%s\t%s\n", m_cnt, v, name );
#  124|   
#  125|       m_string += result;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/ringbuffer.c: scope_hint: In function ‘ffado_ringbuffer_create’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/ringbuffer.c:74:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rb’
#   72|     for (power_of_two = 1; 1 << power_of_two < sz; power_of_two++);
#   73|   
#   74|->   rb->size = 1 << power_of_two;
#   75|     rb->size_mask = rb->size;
#   76|     rb->size_mask -= 1;

Error: COMPILER_WARNING (CWE-252): [#def33]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/serialize_libxml.cpp: scope_hint: In member function ‘void Util::XMLSerialize::writeVersion()’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/serialize_libxml.cpp:85:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#   85 |     asprintf( &valstr, "%s", CACHE_VERSION );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   83|   #endif
#   84|       char* valstr;
#   85|->     asprintf( &valstr, "%s", CACHE_VERSION );
#   86|   #if LIBXMLXX_MAJOR_VERSION == 3
#   87|       pElem->set_first_child_text( valstr );

Error: COMPILER_WARNING (CWE-252): [#def34]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/serialize_libxml.cpp: scope_hint: In member function ‘virtual bool Util::XMLSerialize::write(std::string, long long int)’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/serialize_libxml.cpp:120:13: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
#  120 |     asprintf( &valstr, "%lld", value );
#      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
#  118|   #endif
#  119|       char* valstr;
#  120|->     asprintf( &valstr, "%lld", value );
#  121|   #if LIBXMLXX_MAJOR_VERSION == 3
#  122|       pElem->set_first_child_text( valstr );

Error: COMPILER_WARNING (CWE-762): [#def35]
libffado-2.4.9-build/libffado-2.4.9/src/libutil/unittests.cpp:355:12: warning[-Wmismatched-new-delete]: ‘operator delete(void*)’ called on pointer returned from a mismatched allocation function
#  355 |     delete m_pString;
#      |            ^~~~~~~~~
libffado-2.4.9-build/libffado-2.4.9/src/libutil/unittests.cpp: scope_hint: In function ‘testU3()’
libffado-2.4.9-build/libffado-2.4.9/src/libutil/unittests.cpp:389:28: note: returned from ‘strdup’
#  389 |     sme1.m_pString = strdup( "fancy string" );
#      |                      ~~~~~~^~~~~~~~~~~~~~~~~~
#  353|   U3_SerializeMe::~U3_SerializeMe()
#  354|   {
#  355|->     delete m_pString;
#  356|   }
#  357|   //--------------------------

Error: COMPILER_WARNING (CWE-252): [#def36]
libffado-2.4.9-build/libffado-2.4.9/src/motu/motu_avdevice.cpp: scope_hint: In member function ‘virtual bool Motu::MotuDevice::prepare()’
libffado-2.4.9-build/libffado-2.4.9/src/motu/motu_avdevice.cpp:1189:17: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
# 1189 |         asprintf(&buff,"%s_cap_MIDI0",id.c_str());
#      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1187|       // sequence starting at byte 4 of the event data.
# 1188|       if (m_motu_model != MOTU_MODEL_828MkI) {
# 1189|->         asprintf(&buff,"%s_cap_MIDI0",id.c_str());
# 1190|           p = new Streaming::MotuMidiPort(*m_receiveProcessor, buff,
# 1191|               Streaming::Port::E_Capture, 4);

Error: COMPILER_WARNING (CWE-252): [#def37]
libffado-2.4.9-build/libffado-2.4.9/src/motu/motu_avdevice.cpp:1249:17: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
# 1249 |         asprintf(&buff,"%s_pbk_MIDI0",id.c_str());
#      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1247|       // sequence starting at byte 4 of the event data.
# 1248|       if (m_motu_model != MOTU_MODEL_828MkI) {
# 1249|->         asprintf(&buff,"%s_pbk_MIDI0",id.c_str());
# 1250|           p = new Streaming::MotuMidiPort(*m_transmitProcessor, buff,
# 1251|               Streaming::Port::E_Playback, 4);

Error: COMPILER_WARNING (CWE-252): [#def38]
libffado-2.4.9-build/libffado-2.4.9/src/motu/motu_avdevice.cpp: scope_hint: In member function ‘bool Motu::MotuDevice::addDirPortGroups(Streaming::Port::E_Direction, unsigned int, unsigned int, unsigned int)’
libffado-2.4.9-build/libffado-2.4.9/src/motu/motu_avdevice.cpp:1963:21: warning[-Wunused-result]: ignoring return value of ‘int asprintf(char**, const char*, ...)’ declared with attribute ‘warn_unused_result’
# 1963 |             asprintf(&buff,"%s_%s_%s" , id.c_str(), mode_str, namestr);
#      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1961|               else
# 1962|                   snprintf(namestr, sizeof(namestr), "%s", devprop->portgroup_entry[entry].group_name_format);
# 1963|->             asprintf(&buff,"%s_%s_%s" , id.c_str(), mode_str, namestr);
# 1964|               if (!addPort(s_processor, buff, direction, 
# 1965|                      devprop->portgroup_entry[entry].group_pkt_offset[mode_idx]+3*ch, 0))

Error: COMPILER_WARNING (CWE-252): [#def39]
libffado-2.4.9-build/libffado-2.4.9/src/rme/rme_shm.cpp: scope_hint: In function ‘int rme_shm_open(std::string, rme_shm_t**)’
libffado-2.4.9-build/libffado-2.4.9/src/rme/rme_shm.cpp:109:26: warning[-Wunused-result]: ignoring return value of ‘int ftruncate(int, __off_t)’ declared with attribute ‘warn_unused_result’
#  109 |                 ftruncate(shmfd, RME_SHM_SIZE);
#      |                 ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
#  107|                   return RSO_ERR_SHM;
#  108|               else {
#  109|->                 ftruncate(shmfd, RME_SHM_SIZE);
#  110|                   created = 1;
#  111|               }

Error: COMPILER_WARNING (CWE-252): [#def40]
libffado-2.4.9-build/libffado-2.4.9/support/alsa/alsa_plugin.cpp: scope_hint: In function ‘int snd_pcm_ffado_pollfunction(snd_pcm_ffado_t*)’
libffado-2.4.9-build/libffado-2.4.9/support/alsa/alsa_plugin.cpp:308:10: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  308 |     write(ffado->fd, buf, 1); /* for polling */
#      |     ~~~~~^~~~~~~~~~~~~~~~~~~
#  306|       }
#  307|   
#  308|->     write(ffado->fd, buf, 1); /* for polling */
#  309|   
#  310|       if(res == IpcRingBuffer::eR_OK) {

Error: COMPILER_WARNING (CWE-252): [#def41]
libffado-2.4.9-build/libffado-2.4.9/support/alsa/alsa_plugin.cpp: scope_hint: In function ‘int snd_pcm_ffado_poll_revents(snd_pcm_ioplug_t*, pollfd*, unsigned int, short unsigned int*)’
libffado-2.4.9-build/libffado-2.4.9/support/alsa/alsa_plugin.cpp:360:9: warning[-Wunused-result]: ignoring return value of ‘ssize_t read(int, void*, size_t)’ declared with attribute ‘warn_unused_result’
#  360 |     read(pfds[0].fd, buf, 1);
#      |     ~~~~^~~~~~~~~~~~~~~~~~~~
#  358|       PRINT_FUNCTION_ENTRY;
#  359|       assert(pfds && nfds == 1 && revents);
#  360|->     read(pfds[0].fd, buf, 1);
#  361|       *revents = pfds[0].revents;
#  362|       return 0;

Error: COMPILER_WARNING (CWE-252): [#def42]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp: scope_hint: In function ‘void open_dumpfile()’
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:184:18: warning[-Wunused-result]: ignoring return value of ‘int ftruncate(int, __off_t)’ declared with attribute ‘warn_unused_result’
#  184 |         ftruncate(file, 0);
#      |         ~~~~~~~~~^~~~~~~~~
#  182|           }
#  183|           
#  184|->         ftruncate(file, 0);
#  185|           write_header();
#  186|   }

Error: COMPILER_WARNING (CWE-252): [#def43]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp: scope_hint: In function ‘raw1394_iso_disposition iso_handler(raw1394handle_t, unsigned char*, unsigned int, unsigned char, unsigned char, unsigned char, unsigned int, unsigned int)’
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:219:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  219 |         write(file, &marker, 4);
#      |         ~~~~~^~~~~~~~~~~~~~~~~~
#  217|           unsigned short cycle2 = cycle;
#  218|           unsigned int marker = PACKET_START_MARKER;
#  219|->         write(file, &marker, 4);
#  220|           write(file, &length2, sizeof(length2));
#  221|           write(file, &cycle2, sizeof(cycle2));

Error: COMPILER_WARNING (CWE-252): [#def44]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:220:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  220 |         write(file, &length2, sizeof(length2));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  218|           unsigned int marker = PACKET_START_MARKER;
#  219|           write(file, &marker, 4);
#  220|->         write(file, &length2, sizeof(length2));
#  221|           write(file, &cycle2, sizeof(cycle2));
#  222|           write(file, &channel, sizeof(channel));

Error: COMPILER_WARNING (CWE-252): [#def45]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:221:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  221 |         write(file, &cycle2, sizeof(cycle2));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  219|           write(file, &marker, 4);
#  220|           write(file, &length2, sizeof(length2));
#  221|->         write(file, &cycle2, sizeof(cycle2));
#  222|           write(file, &channel, sizeof(channel));
#  223|           write(file, &cycle_timer, sizeof(cycle_timer));

Error: COMPILER_WARNING (CWE-252): [#def46]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:222:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  222 |         write(file, &channel, sizeof(channel));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  220|           write(file, &length2, sizeof(length2));
#  221|           write(file, &cycle2, sizeof(cycle2));
#  222|->         write(file, &channel, sizeof(channel));
#  223|           write(file, &cycle_timer, sizeof(cycle_timer));
#  224|           write(file, &timestamp, sizeof(timestamp));

Error: COMPILER_WARNING (CWE-252): [#def47]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:223:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  223 |         write(file, &cycle_timer, sizeof(cycle_timer));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  221|           write(file, &cycle2, sizeof(cycle2));
#  222|           write(file, &channel, sizeof(channel));
#  223|->         write(file, &cycle_timer, sizeof(cycle_timer));
#  224|           write(file, &timestamp, sizeof(timestamp));
#  225|           write(file, &tag, sizeof(tag));

Error: COMPILER_WARNING (CWE-252): [#def48]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:224:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  224 |         write(file, &timestamp, sizeof(timestamp));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  222|           write(file, &channel, sizeof(channel));
#  223|           write(file, &cycle_timer, sizeof(cycle_timer));
#  224|->         write(file, &timestamp, sizeof(timestamp));
#  225|           write(file, &tag, sizeof(tag));
#  226|           write(file, &sy, sizeof(sy));

Error: COMPILER_WARNING (CWE-252): [#def49]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:225:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  225 |         write(file, &tag, sizeof(tag));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#  223|           write(file, &cycle_timer, sizeof(cycle_timer));
#  224|           write(file, &timestamp, sizeof(timestamp));
#  225|->         write(file, &tag, sizeof(tag));
#  226|           write(file, &sy, sizeof(sy));
#  227|           sy = 0;

Error: COMPILER_WARNING (CWE-252): [#def50]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:226:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  226 |         write(file, &sy, sizeof(sy));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#  224|           write(file, &timestamp, sizeof(timestamp));
#  225|           write(file, &tag, sizeof(tag));
#  226|->         write(file, &sy, sizeof(sy));
#  227|           sy = 0;
#  228|           write(file, &sy, sizeof(sy));

Error: COMPILER_WARNING (CWE-252): [#def51]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:228:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  228 |         write(file, &sy, sizeof(sy));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#  226|           write(file, &sy, sizeof(sy));
#  227|           sy = 0;
#  228|->         write(file, &sy, sizeof(sy));
#  229|   
#  230|           while (length) {

Error: COMPILER_WARNING (CWE-252): [#def52]
libffado-2.4.9-build/libffado-2.4.9/tests/dumpiso_mod.cpp:241:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  241 |         write(file, &marker, 4);
#      |         ~~~~~^~~~~~~~~~~~~~~~~~
#  239|           }
#  240|           marker = PACKET_STOP_MARKER;
#  241|->         write(file, &marker, 4);
#  242|   
#  243|           return RAW1394_ISO_OK;

Error: COMPILER_WARNING (CWE-252): [#def53]
libffado-2.4.9-build/libffado-2.4.9/tests/scan-devreg.cpp: scope_hint: In function ‘int main(int, char**)’
libffado-2.4.9-build/libffado-2.4.9/tests/scan-devreg.cpp:318:14: warning[-Wunused-result]: ignoring return value of ‘char* fgets(char*, int, FILE*)’ declared with attribute ‘warn_unused_result’
#  318 |         fgets(chr, sizeof(chr), stdin);
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#  316|   
#  317|           printf("Press <Enter> to scan, \"q<Enter>\" to exit\n");
#  318|->         fgets(chr, sizeof(chr), stdin);
#  319|           loop++;
#  320|       }

Error: CPPCHECK_WARNING (CWE-457): [#def54]
libffado-2.4.9-build/libffado-2.4.9/tests/test-focusrite.cpp:191: error[legacyUninitvar]: Uninitialized variable: old_vals[id]
#  189|                   value = CondSwapFromBus32(value);
#  190|               
#  191|->                 if (old_vals[id] != value) {
#  192|                       printf("%04d changed from %08X to %08X\n", id,  old_vals[id], value);
#  193|                       old_vals[id] = value;

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-42.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibffado-2.4.9-3.fc42
store-results-to/tmp/tmpqujl83mf/libffado-2.4.9-3.fc42.tar.xz
time-created2024-11-13 01:21:28
time-finished2024-11-13 01:24:04
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpqujl83mf/libffado-2.4.9-3.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpqujl83mf/libffado-2.4.9-3.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9