libffado-2.4.8-5.fc41

List of Defects

Error: COMPILER_WARNING (CWE-563): [#def1]
libffado-2.4.8-build/libffado-2.4.8/cache/conftest_7c8d9da9f38e9e1b717729bacb3f12aa_0.c: scope_hint: In function ‘main’
libffado-2.4.8-build/libffado-2.4.8/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.8-build/libffado-2.4.8/cache/conftest_e05fedd4c0c2a154158929f57c9b4d78_0.c: scope_hint: In function ‘main’
libffado-2.4.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def3]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/bebob_avdevice.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def4]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/bebob_avdevice.cpp: scope_hint: In member function ‘virtual bool BeBoB::Device::loadFromCache()’
libffado-2.4.8-build/libffado-2.4.8/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): [#def5]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/bebob_avdevice.cpp: scope_hint: In member function ‘virtual bool BeBoB::Device::saveCache()’
libffado-2.4.8-build/libffado-2.4.8/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: [#def6]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/bebob_avplug.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-909): [#def7]
libffado-2.4.8-build/libffado-2.4.8/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): [#def8]
libffado-2.4.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def9]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/bebob_dl_mgr.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/bebob_mixer.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def11]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/focusrite/focusrite_generic.cpp:107:5: warning[core.CallAndMessage]: 8th function call argument is an uninitialized value
#  105|           retval = getSpecificValueARM(id, v);
#  106|       }
#  107|->     debugOutput(DEBUG_LEVEL_VERBOSE,"Read parameter address space id 0x%08X (%u): %08X\n", id, id, *v);
#  108|       return retval;
#  109|   }

Error: CPPCHECK_WARNING: [#def12]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/focusrite/focusrite_saffirepro.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def13]
libffado-2.4.8-build/libffado-2.4.8/src/bebob/maudio/special_mixer.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def14]
libffado-2.4.8-build/libffado-2.4.8/src/debugmodule/debugmodule.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def15]
libffado-2.4.8-build/libffado-2.4.8/src/debugmodule/debugmodule.cpp:463:13: warning[deadcode.DeadStores]: Value stored to 'already_present' is never read
#  461|       {
#  462|           if ( *it == &debugModule ) {
#  463|->             already_present=true;
#  464|               return true;
#  465|           }

Error: CPPCHECK_WARNING: [#def16]
libffado-2.4.8-build/libffado-2.4.8/src/devicemanager.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def17]
libffado-2.4.8-build/libffado-2.4.8/src/devicemanager.cpp:1168:12: warning[core.CallAndMessage]: Called C++ object pointer is null
# 1166|       }
# 1167|   
# 1168|->     return avDevice->getConfigRom().getNodeId();
# 1169|   }
# 1170|   

Error: CPPCHECK_WARNING: [#def18]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def19]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:440:23: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
#  438|       readGlobalReg(DICE_REGISTER_GLOBAL_STATUS, &statusreg);
#  439|       int n_it = 0;
#  440|->     while (((statusreg&0x1) == 0 || ((clockreg>>8) & 0xFF) != ((statusreg>>8) & 0xFF)) && n_it < 20) {
#  441|           usleep(100000);
#  442|           readGlobalReg(DICE_REGISTER_GLOBAL_STATUS, &statusreg);

Error: CLANG_WARNING: [#def20]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:463:45: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>>' is a garbage value
#  461|       quadlet_t clock_caps;
#  462|       readGlobalReg(DICE_REGISTER_GLOBAL_CLOCKCAPABILITIES, &clock_caps);
#  463|->     uint16_t clocks_supported = (clock_caps >> 16) & 0xFFFF;
#  464|       debugOutput(DEBUG_LEVEL_VERBOSE," Clock caps: 0x%08" PRIX32 ", supported=0x%04X\n",
#  465|                                       clock_caps, clocks_supported);

Error: CLANG_WARNING: [#def21]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:469:44: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
#  467|       quadlet_t clock_select;
#  468|       readGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, &clock_select);
#  469|->     byte_t clock_selected = (clock_select) & 0xFF;
#  470|       debugOutput(DEBUG_LEVEL_VERBOSE," Clock select: 0x%08" PRIX32 ", selected=0x%04X\n",
#  471|                                       clock_select, clock_selected);

Error: CLANG_WARNING: [#def22]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:475:47: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
#  473|       readGlobalReg(DICE_REGISTER_GLOBAL_EXTENDED_STATUS, &extended_status);
#  474|       #ifdef DEBUG
#  475|->     uint16_t clock_status = (extended_status) & 0xFFFF;
#  476|       uint16_t clock_slipping = (extended_status >> 16) & 0xFFFF;
#  477|       debugOutput(DEBUG_LEVEL_VERBOSE," Clock status: 0x%08" PRIX32 ", status=0x%04X, slip=0x%04X\n",

Error: CLANG_WARNING: [#def23]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:627:45: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>>' is a garbage value
#  625|       quadlet_t clock_caps;
#  626|       readGlobalReg(DICE_REGISTER_GLOBAL_CLOCKCAPABILITIES, &clock_caps);
#  627|->     uint16_t clocks_supported = (clock_caps >> 16) & 0xFFFF;
#  628|       debugOutput(DEBUG_LEVEL_VERBOSE," Clock caps: 0x%08" PRIX32 ", supported=0x%04X\n",
#  629|                                       clock_caps, clocks_supported);

Error: CLANG_WARNING: [#def24]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:633:32: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
#  631|       quadlet_t clock_select;
#  632|       readGlobalReg(DICE_REGISTER_GLOBAL_CLOCK_SELECT, &clock_select);
#  633|->     byte_t id = (clock_select) & 0xFF;
#  634|       debugOutput(DEBUG_LEVEL_VERBOSE," Clock select: 0x%08" PRIX32 ", selected=0x%04X\n",
#  635|                                       clock_select, id);

Error: CLANG_WARNING: [#def25]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:639:47: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
#  637|       readGlobalReg(DICE_REGISTER_GLOBAL_EXTENDED_STATUS, &extended_status);
#  638|       #ifdef DEBUG
#  639|->     uint16_t clock_status = (extended_status) & 0xFFFF;
#  640|       uint16_t clock_slipping = (extended_status >> 16) & 0xFFFF;
#  641|       debugOutput(DEBUG_LEVEL_VERBOSE," Clock status: 0x%08" PRIX32 ", status=0x%04X, slip=0x%04X\n",

Error: CLANG_WARNING: [#def26]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:729:5: warning[core.CallAndMessage]: 6th function call argument is an uninitialized value
#  727|   
#  728|       readGlobalReg(DICE_REGISTER_GLOBAL_NOTIFICATION, &tmp_quadlet);
#  729|->     printMessage("  Notification     : 0x%08" PRIX32 "\n",tmp_quadlet);
#  730|   
#  731|       readGlobalReg(DICE_REGISTER_GLOBAL_NOTIFICATION, &tmp_quadlet);

Error: CLANG_WARNING: [#def27]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:1127:12: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'p'
# 1125|       }
# 1126|   
# 1127|->     return true;
# 1128|   }
# 1129|   

Error: CLANG_WARNING: [#def28]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:1494:20: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
# 1492|       // I don't know what exactly is 'enable',
# 1493|       // but disable is definately == 0
# 1494|->     return (result != DICE_ISOSTREAMING_DISABLE);
# 1495|   }
# 1496|   

Error: CLANG_WARNING: [#def29]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_avdevice.cpp:1505:21: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value
# 1503|       fb_quadlet_t result;
# 1504|       readGlobalReg(offset, &result);
# 1505|->     return ((result & mask) == 0);
# 1506|   }
# 1507|   /**

Error: CPPCHECK_WARNING: [#def30]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_eap.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def31]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_eap.cpp:852:1: warning[unix.Malloc]: Potential leak of memory pointed to by 'tmp'
#  850|           }
#  851|       }
#  852|-> }
#  853|   
#  854|   void

Error: CLANG_WARNING: [#def32]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_eap.cpp:1362:9: warning[deadcode.DeadStores]: Value stored to 'cnt' is never read
# 1360|    
# 1361|           // Display destinations name
# 1362|->         cnt += snprintf(tmp+cnt, bufflen-cnt, "=[%02d]=> %s", i, getColName(i).data());
# 1363|           printMessage("%s\n", tmp);
# 1364|       }

Error: CLANG_WARNING: [#def33]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_eap.cpp:1815:5: warning[core.VLASize]: Declared variable-length array (VLA) has zero size
# 1813|   
# 1814|       // read the route info
# 1815|->     uint32_t tmp_entries[nb_routes];
# 1816|       if(!m_eap.readRegBlock(base, offset+4, tmp_entries, nb_routes*4)) {
# 1817|           debugError("Failed to read router config block information\n");

Error: CLANG_WARNING: [#def34]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_eap.cpp:1839:5: warning[core.VLASize]: Declared variable-length array (VLA) has zero size
# 1837|           nb_routes = 128;
# 1838|       }
# 1839|->     uint32_t tmp_entries[nb_routes];
# 1840|   
# 1841|       // encode from the routing vector

Error: CLANG_WARNING: [#def35]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_firmware_loader.cpp:135:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'pflash_info'
#  133|   			}
#  134|   		}
#  135|-> 		file.close();
#  136|   		printMessage("Dumping successfully finished to file %s\n", filename);
#  137|   		return true;

Error: CLANG_WARNING: [#def36]
libffado-2.4.8-build/libffado-2.4.8/src/dice/dice_firmware_loader.cpp:172:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'pflash_info'
#  170|   	} else {
#  171|   		printMessage("Cannot read flash information\n");
#  172|-> 		return pflash_info = NULL;
#  173|   	}
#  174|   }

Error: CLANG_WARNING: [#def37]
libffado-2.4.8-build/libffado-2.4.8/src/dice/focusrite/focusrite_eap.cpp:179:5: warning[deadcode.DeadStores]: Value stored to 'm_value' is never read
#  177|           return true;
#  178|   
#  179|->     m_value = n;
#  180|       tmp &= ~(0xff<<m_bitshift);
#  181|       bool ret = m_eap->writeApplicationReg(m_offset, ((-n)<<m_bitshift)|tmp);

Error: CPPCHECK_WARNING: [#def38]
libffado-2.4.8-build/libffado-2.4.8/src/ffado.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def39]
libffado-2.4.8-build/libffado-2.4.8/src/ffado.cpp:181:9: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'dev'
#  179|       // prepare here or there are no ports for jack
#  180|       if(!dev->m_deviceManager->initStreaming()) {
#  181|->         debugFatal("Could not init the streaming system\n");
#  182|           return 0;
#  183|       }

Error: COMPILER_WARNING (CWE-457): [#def40]
libffado-2.4.8-build/libffado-2.4.8/src/fireworks/efc/efc_cmds_hardware.cpp: scope_hint: In member function ‘FireWorks::EfcPolledValuesCmd::showEfcCmd()’
libffado-2.4.8-build/libffado-2.4.8/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.8-build/libffado-2.4.8/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: CLANG_WARNING: [#def41]
libffado-2.4.8-build/libffado-2.4.8/src/fireworks/efc/efc_cmds_hardware.cpp:259:18: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<' is a garbage value
#  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: [#def42]
libffado-2.4.8-build/libffado-2.4.8/src/fireworks/fireworks_device.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def43]
libffado-2.4.8-build/libffado-2.4.8/src/fireworks/fireworks_device.cpp:925:32: warning[core.UndefinedBinaryOperatorResult]: The right operand of '!=' is a garbage value
#  923|               // everything should be 0xFFFFFFFF if the erase was successful
#  924|               for (unsigned int i = 0; i < blocksize_quads; i++) {
#  925|->                 if (0xFFFFFFFF != verify[i]) {
#  926|                       debugWarning("Flash erase verification failed.\n");
#  927|                       success = false;

Error: CPPCHECK_WARNING: [#def44]
libffado-2.4.8-build/libffado-2.4.8/src/fireworks/fireworks_firmware.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def45]
libffado-2.4.8-build/libffado-2.4.8/src/fireworks/fireworks_firmware.cpp:131:5: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  129|       m_data = new uint32_t[m_length_quads];
#  130|   
#  131|->     memcpy(m_data, f.m_data, m_length_quads*sizeof(uint32_t));
#  132|   }
#  133|   

Error: CPPCHECK_WARNING: [#def46]
libffado-2.4.8-build/libffado-2.4.8/src/fireworks/fireworks_session_block.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def47]
libffado-2.4.8-build/libffado-2.4.8/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: [#def48]
libffado-2.4.8-build/libffado-2.4.8/src/genericavc/avc_avdevice.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def49]
libffado-2.4.8-build/libffado-2.4.8/src/genericavc/avc_avdevice.cpp:687:15: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'p'
#  685|           for ( AVC::Plug::ChannelInfoVector::const_iterator it = channelInfos.begin();
#  686|                 it != channelInfos.end();
#  687|->               ++it )
#  688|           {
#  689|               const AVC::Plug::ChannelInfo* channelInfo = &( *it );

Error: CPPCHECK_WARNING: [#def50]
libffado-2.4.8-build/libffado-2.4.8/src/genericavc/stanton/scs.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def51]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/descriptors/avc_descriptor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-823): [#def52]
libffado-2.4.8-build/libffado-2.4.8/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): [#def53]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/general/avc_extended_plug_info.cpp: scope_hint: In member function ‘virtual bool AVC::ExtendedPlugInfoInfoType::serialize(Util::Cmd::IOSSerialize&)’
libffado-2.4.8-build/libffado-2.4.8/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): [#def54]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/general/avc_generic.cpp: scope_hint: In member function ‘virtual bool AVC::AVCCommand::serialize(Util::Cmd::IOSSerialize&)’
libffado-2.4.8-build/libffado-2.4.8/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): [#def55]
libffado-2.4.8-build/libffado-2.4.8/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: [#def56]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/general/avc_plug.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def57]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/general/avc_unit.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def58]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/musicsubunit/avc_descriptor_music.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def59]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/musicsubunit/avc_descriptor_music.cpp:91:5: warning[deadcode.DeadStores]: Value stored to 'result' is never read
#   89|   {
#   90|       bool result=true;
#   91|->     result &= AVCInfoBlock::serialize(se);
#   92|       debugWarning("%s not supported\n", getInfoBlockName());
#   93|       result=false;

Error: CLANG_WARNING: [#def60]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/musicsubunit/avc_descriptor_music.cpp:708:9: warning[deadcode.DeadStores]: Value stored to 'result' is never read
#  706|       
#  707|       if (m_routing_status_infoblock.m_compound_length>0) {
#  708|->         result &= m_routing_status_infoblock.serialize(se);
#  709|       }
#  710|   

Error: CLANG_WARNING: [#def61]
libffado-2.4.8-build/libffado-2.4.8/src/libavc/musicsubunit/avc_musicsubunit.cpp:89:12: warning[core.CallAndMessage]: Called C++ object pointer is null
#   87|   
#   88|       AVCMusicSubunitPlugInfoBlock *info;
#   89|->     info = m_status_descriptor->getSubunitPlugInfoBlock(plug.getDirection(), plug.getPlugId());
#   90|   
#   91|       if (info == NULL) {

Error: CPPCHECK_WARNING (CWE-909): [#def62]
libffado-2.4.8-build/libffado-2.4.8/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): [#def63]
libffado-2.4.8-build/libffado-2.4.8/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: [#def64]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/CycleTimerHelper.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def65]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/IsoHandlerManager.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-664): [#def66]
libffado-2.4.8-build/libffado-2.4.8/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): [#def67]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/configrom.cpp: scope_hint: In member function ‘const std::string ConfigRom::getGuidString() const’
libffado-2.4.8-build/libffado-2.4.8/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: [#def68]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def69]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c:587:3: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  585|   
#  586|   	if (palette_size)
#  587|-> 		memcpy(CSR1212_ICON_DESCRIPTOR_LEAF_PALETTE(kv), palette,
#  588|   		       palette_size);
#  589|   

Error: CLANG_WARNING: [#def70]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c:656:50: warning[core.NullDereference]: Dereference of null pointer
#  654|   
#  655|   	/* make sure last quadlet is zeroed out */
#  656|-> 	*((u_int32_t*)&(buffer[(data_len - 1) & ~0x3])) = 0;
#  657|   
#  658|   	/* Copy keyword(s) into leaf data buffer */

Error: CPPCHECK_WARNING (CWE-590): [#def71]
libffado-2.4.8-build/libffado-2.4.8/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: CLANG_WARNING: [#def72]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c:1072:34: warning[core.NullDereference]: Access to field 'offset' results in a dereference of a null pointer (loaded from variable 'kv')
# 1070|   	for (kv = cache->layout_head; kv != cache->layout_tail->next; kv = nkv) {
# 1071|   		kvi = (struct csr1212_keyval_img *)
# 1072|-> 			(cache->data + bytes_to_quads(kv->offset - cache->offset));
# 1073|   		switch(kv->key.type) {
# 1074|   		default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c: scope_hint: In function ‘csr1212_parse_bus_info_block’
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c:1294:38: warning[-Wanalyzer-malloc-leak]: leak of ‘cr’
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c:61: included_from: Included from here.
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/csr1212.c:1284:14: note: in expansion of macro ‘CSR1212_MALLOC’
libffado-2.4.8-build/libffado-2.4.8/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: [#def74]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/ieee1394service.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def75]
libffado-2.4.8-build/libffado-2.4.8/src/libieee1394/test-cyclecalc.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def76]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/StreamProcessorManager.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def77]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/StreamProcessorManager.cpp:201:13: warning[core.CallAndMessage]: 8th function call argument is an uninitialized value
#  199|               debugError("(%p) sem_[timed]wait error (result=%d errno=EINVAL)\n", 
#  200|                           this, result);
#  201|->             debugError("(%p) timeout_nsec=%" PRId64 " ts.sec=%" PRId64 " ts.nsec=%" PRId64 "\n", 
#  202|                          this, m_activity_wait_timeout_nsec,
#  203|   		       (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec);

Error: CLANG_WARNING: [#def78]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/StreamProcessorManager.cpp:208:13: warning[core.CallAndMessage]: 8th function call argument is an uninitialized value
#  206|               debugError("(%p) sem_[timed]wait error (result=%d errno=%d)\n", 
#  207|                           this, result, errno);
#  208|->             debugError("(%p) timeout_nsec=%" PRId64 " ts.sec=%" PRId64 " ts.nsec=%" PRId64 "\n", 
#  209|                          this, m_activity_wait_timeout_nsec, 
#  210|   		       (int64_t)ts.tv_sec, (int64_t)ts.tv_nsec);

Error: CLANG_WARNING: [#def79]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/StreamProcessorManager.cpp:680:57: warning[core.DivideZero]: Division by zero
#  678|       double time_for_startup_abs = (double)(cycles_for_startup * TICKS_PER_CYCLE);
#  679|       int time_for_startup_frames = (int)(time_for_startup_abs / tpf);
#  680|->     time_for_startup_frames = ((time_for_startup_frames / max_packet_size_frames) + 1) * max_packet_size_frames;
#  681|       uint64_t time_for_startup_ticks = (uint64_t)((float)time_for_startup_frames * tpf);
#  682|   

Error: CLANG_WARNING: [#def80]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/StreamProcessorManager.cpp:924:13: warning[deadcode.DeadStores]: Value stored to 'i' is never read
#  922|   
#  923|               // now calculate the stream offset
#  924|->             i = 0;
#  925|               for ( i = 0; i < nb_rcv_sp; i++) {
#  926|                   StreamProcessor *s = m_ReceiveProcessors.at(i);

Error: CLANG_WARNING: [#def81]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/StreamProcessorManager.cpp:948:37: warning[core.DivideZero]: Division by zero
#  946|               StreamProcessor *s = m_ReceiveProcessors.at(i);
#  947|   
#  948|->             diff_between_streams[i] /= periods_per_align_try;
#  949|               diff_between_streams_frames[i] = (int)roundf(diff_between_streams[i] / s->getTicksPerFrame());
#  950|               debugOutput( DEBUG_LEVEL_VERBOSE, "   avg offset between SyncSP %p and SP %p is %" PRId64 " ticks, %d frames...\n", 

Error: CPPCHECK_WARNING: [#def82]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/amdtp-oxford/AmdtpOxfordReceiveStreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def83]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/amdtp/AmdtpReceiveStreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-909): [#def84]
libffado-2.4.8-build/libffado-2.4.8/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): [#def85]
libffado-2.4.8-build/libffado-2.4.8/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): [#def86]
libffado-2.4.8-build/libffado-2.4.8/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): [#def87]
libffado-2.4.8-build/libffado-2.4.8/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: [#def88]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/amdtp/AmdtpTransmitStreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-909): [#def89]
libffado-2.4.8-build/libffado-2.4.8/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): [#def90]
libffado-2.4.8-build/libffado-2.4.8/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): [#def91]
libffado-2.4.8-build/libffado-2.4.8/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): [#def92]
libffado-2.4.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def93]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/generic/PortManager.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def94]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/generic/StreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def95]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/motu/MotuReceiveStreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def96]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/motu/MotuTransmitStreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def97]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/rme/RmeReceiveStreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def98]
libffado-2.4.8-build/libffado-2.4.8/src/libstreaming/rme/RmeTransmitStreamProcessor.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def99]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/Configuration.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def100]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/PosixMessageQueue.cpp:211:13: warning[deadcode.DeadStores]: Although the value stored to 'len' is used in the enclosing expression, the value is never actually read from 'len'
#  209|           signed int len;
#  210|           unsigned prio;
#  211|->         if((len = mq_timedreceive(m_handle, m_tmp_buffer, m_attr.mq_msgsize, &prio, &timeout)) < 0) {
#  212|               switch(errno) {
#  213|                   case EAGAIN:

Error: CPPCHECK_WARNING: [#def101]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/TimestampedBuffer.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def102]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/Watchdog.cpp: scope_hint: In member function ‘void Util::Watchdog::WatchdogTask::ReqStop()’
libffado-2.4.8-build/libffado-2.4.8/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): [#def103]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/cmd_serialize.cpp: scope_hint: In member function ‘virtual bool Util::Cmd::StringSerializer::write(byte_t, const char*)’
libffado-2.4.8-build/libffado-2.4.8/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): [#def104]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/cmd_serialize.cpp: scope_hint: In member function ‘virtual bool Util::Cmd::StringSerializer::write(uint16_t, const char*)’
libffado-2.4.8-build/libffado-2.4.8/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): [#def105]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/cmd_serialize.cpp: scope_hint: In member function ‘virtual bool Util::Cmd::StringSerializer::write(quadlet_t, const char*)’
libffado-2.4.8-build/libffado-2.4.8/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): [#def106]
libffado-2.4.8-build/libffado-2.4.8/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.8-build/libffado-2.4.8/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): [#def107]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/ringbuffer.c: scope_hint: In function ‘ffado_ringbuffer_create’
libffado-2.4.8-build/libffado-2.4.8/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: CLANG_WARNING: [#def108]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/ringbuffer.c:239:5: warning[deadcode.DeadStores]: Value stored to 'tmp_read_ptr' is never read
#  237|       // FIXME: tmp_read_ptr is not used anymore
#  238|       tmp_read_ptr += n2;
#  239|->     tmp_read_ptr &= rb->size_mask;
#  240|     }
#  241|   

Error: CPPCHECK_WARNING: [#def109]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/serialize_libxml.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def110]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/serialize_libxml.cpp: scope_hint: In member function ‘void Util::XMLSerialize::writeVersion()’
libffado-2.4.8-build/libffado-2.4.8/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): [#def111]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/serialize_libxml.cpp: scope_hint: In member function ‘virtual bool Util::XMLSerialize::write(std::string, long long int)’
libffado-2.4.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def112]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/test-dll.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def113]
libffado-2.4.8-build/libffado-2.4.8/src/libutil/unittests.cpp:355:5: warning[unix.MismatchedDeallocator]: Memory allocated by strdup() should be deallocated by free(), not 'delete'
#  353|   U3_SerializeMe::~U3_SerializeMe()
#  354|   {
#  355|->     delete m_pString;
#  356|   }
#  357|   //--------------------------

Error: COMPILER_WARNING (CWE-762): [#def114]
libffado-2.4.8-build/libffado-2.4.8/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.8-build/libffado-2.4.8/src/libutil/unittests.cpp: scope_hint: In function ‘testU3()’
libffado-2.4.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def115]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_avdevice.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def116]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_avdevice.cpp:1064:5: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value
# 1062|       // Initialise port groups and determine the event sizes based on the
# 1063|       // current device mode and sample rate.
# 1064|->     initDirPortGroups(Streaming::Port::E_Capture, samp_freq, optical_in_mode_a, optical_in_mode_b);
# 1065|       initDirPortGroups(Streaming::Port::E_Playback, samp_freq, optical_out_mode_a, optical_out_mode_b);
# 1066|   

Error: CLANG_WARNING: [#def117]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_avdevice.cpp:1065:5: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value
# 1063|       // current device mode and sample rate.
# 1064|       initDirPortGroups(Streaming::Port::E_Capture, samp_freq, optical_in_mode_a, optical_in_mode_b);
# 1065|->     initDirPortGroups(Streaming::Port::E_Playback, samp_freq, optical_out_mode_a, optical_out_mode_b);
# 1066|   
# 1067|       event_size_in = getEventSize(MOTU_DIR_IN);

Error: COMPILER_WARNING (CWE-252): [#def118]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_avdevice.cpp: scope_hint: In member function ‘virtual bool Motu::MotuDevice::prepare()’
libffado-2.4.8-build/libffado-2.4.8/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: CLANG_WARNING: [#def119]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_avdevice.cpp:1226:9: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'p'
# 1224|   
# 1225|       if(!m_transmitProcessor->init()) {
# 1226|->         debugFatal("Could not initialize transmit processor!\n");
# 1227|           return false;
# 1228|       }

Error: COMPILER_WARNING (CWE-252): [#def120]
libffado-2.4.8-build/libffado-2.4.8/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: CLANG_WARNING: [#def121]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_avdevice.cpp:1255:9: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'p'
# 1253|               debugOutput(DEBUG_LEVEL_VERBOSE, "Skipped port %s\n", buff);
# 1254|           }
# 1255|->         free(buff);
# 1256|       }
# 1257|   

Error: CLANG_WARNING: [#def122]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_avdevice.cpp:1771:5: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'p'
# 1769|           debugOutput(DEBUG_LEVEL_VERBOSE, "Skipped port %s\n",name);
# 1770|       }
# 1771|->     free(name);
# 1772|       return true;
# 1773|   }

Error: COMPILER_WARNING (CWE-252): [#def123]
libffado-2.4.8-build/libffado-2.4.8/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.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def124]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_mixer.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def125]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_mixer.cpp:84:34: warning[core.NullDereference]: Dereference of null pointer
#   82|   
#   83|       for (bus=0; bus<DevicesProperty[m_motu_model-1].mixer->n_mixer_buses; bus++) {
#   84|->         fader_mmixer->addRowInfo(buses[bus].name, 0, buses[bus].address);
#   85|           pan_mmixer->addRowInfo(buses[bus].name, 0, buses[bus].address);
#   86|           solo_mmixer->addRowInfo(buses[bus].name, 0, buses[bus].address);

Error: CLANG_WARNING: [#def126]
libffado-2.4.8-build/libffado-2.4.8/src/motu/motu_mixer.cpp:91:26: warning[core.NullDereference]: Dereference of null pointer
#   89|   
#   90|       for (ch=0; ch<DevicesProperty[m_motu_model-1].mixer->n_mixer_channels; ch++) {
#   91|->         uint32_t flags = channels[ch].flags;
#   92|           if (flags & MOTU_CTRL_CHANNEL_FADER)
#   93|               fader_mmixer->addColInfo(channels[ch].name, 0, channels[ch].addr_ofs);

Error: CPPCHECK_WARNING: [#def127]
libffado-2.4.8-build/libffado-2.4.8/src/oxford/oxford_device.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def128]
libffado-2.4.8-build/libffado-2.4.8/src/rme/fireface_flash.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def129]
libffado-2.4.8-build/libffado-2.4.8/src/rme/fireface_hw.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def130]
libffado-2.4.8-build/libffado-2.4.8/src/rme/rme_avdevice.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def131]
libffado-2.4.8-build/libffado-2.4.8/src/rme/rme_shm.cpp: scope_hint: In function ‘int rme_shm_open(std::string, rme_shm_t**)’
libffado-2.4.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def132]
libffado-2.4.8-build/libffado-2.4.8/support/alsa/alsa_plugin.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def133]
libffado-2.4.8-build/libffado-2.4.8/support/alsa/alsa_plugin.cpp: scope_hint: In function ‘int snd_pcm_ffado_pollfunction(snd_pcm_ffado_t*)’
libffado-2.4.8-build/libffado-2.4.8/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): [#def134]
libffado-2.4.8-build/libffado-2.4.8/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.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def135]
libffado-2.4.8-build/libffado-2.4.8/support/dbus/controlserver.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def136]
libffado-2.4.8-build/libffado-2.4.8/support/dbus/ffado-dbus-server.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def137]
libffado-2.4.8-build/libffado-2.4.8/support/firmware/bridgeco-downloader.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def138]
libffado-2.4.8-build/libffado-2.4.8/support/firmware/dice-firmware-utility.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def139]
libffado-2.4.8-build/libffado-2.4.8/support/firmware/fireworks-downloader.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def140]
libffado-2.4.8-build/libffado-2.4.8/support/tools/ffado-set-nickname.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def141]
libffado-2.4.8-build/libffado-2.4.8/tests/dumpiso_mod.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def142]
libffado-2.4.8-build/libffado-2.4.8/tests/dumpiso_mod.cpp: scope_hint: In function ‘void open_dumpfile()’
libffado-2.4.8-build/libffado-2.4.8/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): [#def143]
libffado-2.4.8-build/libffado-2.4.8/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.8-build/libffado-2.4.8/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): [#def144]
libffado-2.4.8-build/libffado-2.4.8/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): [#def145]
libffado-2.4.8-build/libffado-2.4.8/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): [#def146]
libffado-2.4.8-build/libffado-2.4.8/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): [#def147]
libffado-2.4.8-build/libffado-2.4.8/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): [#def148]
libffado-2.4.8-build/libffado-2.4.8/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): [#def149]
libffado-2.4.8-build/libffado-2.4.8/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): [#def150]
libffado-2.4.8-build/libffado-2.4.8/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): [#def151]
libffado-2.4.8-build/libffado-2.4.8/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): [#def152]
libffado-2.4.8-build/libffado-2.4.8/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: CPPCHECK_WARNING: [#def153]
libffado-2.4.8-build/libffado-2.4.8/tests/scan-devreg.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def154]
libffado-2.4.8-build/libffado-2.4.8/tests/scan-devreg.cpp: scope_hint: In function ‘int main(int, char**)’
libffado-2.4.8-build/libffado-2.4.8/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: [#def155]
libffado-2.4.8-build/libffado-2.4.8/tests/set-default-router-config-dice-eap.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def156]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/test-ipcclient.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def157]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming-ipc.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def158]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming-ipc.cpp:454:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'audiobuffers_in'
#  452|       // start the streaming layer
#  453|       if (ffado_streaming_prepare(dev)) {
#  454|->         debugFatal("Could not prepare streaming system\n");
#  455|           ffado_streaming_finish(dev);
#  456|           return -1;

Error: CLANG_WARNING: [#def159]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming-ipc.cpp:454:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'audiobuffers_out'
#  452|       // start the streaming layer
#  453|       if (ffado_streaming_prepare(dev)) {
#  454|->         debugFatal("Could not prepare streaming system\n");
#  455|           ffado_streaming_finish(dev);
#  456|           return -1;

Error: CLANG_WARNING: [#def160]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming-ipc.cpp:454:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'nullbuffer'
#  452|       // start the streaming layer
#  453|       if (ffado_streaming_prepare(dev)) {
#  454|->         debugFatal("Could not prepare streaming system\n");
#  455|           ffado_streaming_finish(dev);
#  456|           return -1;

Error: CPPCHECK_WARNING: [#def161]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming3.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def162]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming3.cpp:404:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'audiobuffers_in'
#  402|       // start the streaming layer
#  403|       if (ffado_streaming_prepare(dev)) {
#  404|->         debugFatal("Could not prepare streaming system\n");
#  405|           ffado_streaming_finish(dev);
#  406|           return -1;

Error: CLANG_WARNING: [#def163]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming3.cpp:404:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'audiobuffers_out'
#  402|       // start the streaming layer
#  403|       if (ffado_streaming_prepare(dev)) {
#  404|->         debugFatal("Could not prepare streaming system\n");
#  405|           ffado_streaming_finish(dev);
#  406|           return -1;

Error: CLANG_WARNING: [#def164]
libffado-2.4.8-build/libffado-2.4.8/tests/streaming/teststreaming3.cpp:404:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'nullbuffer'
#  402|       // start the streaming layer
#  403|       if (ffado_streaming_prepare(dev)) {
#  404|->         debugFatal("Could not prepare streaming system\n");
#  405|           ffado_streaming_finish(dev);
#  406|           return -1;

Error: CLANG_WARNING: [#def165]
libffado-2.4.8-build/libffado-2.4.8/tests/systemtests/test-clock_nanosleep.cpp:100:24: warning[deadcode.DeadStores]: Although the value stored to 'now' is used in the enclosing expression, the value is never actually read from 'now'
#   98|       debugOutput( DEBUG_LEVEL_VERBOSE, "start %p\n", obj);
#   99|       uint64_t now = getCurrentTimeAsUsecs();
#  100|->     uint64_t wake_at = now += SLEEP_PERIOD_USECS;
#  101|       // If Init succeed start the thread loop
#  102|       while (obj->fRunning) {

Error: CLANG_WARNING: [#def166]
libffado-2.4.8-build/libffado-2.4.8/tests/systemtests/test-sysload.cpp:182:18: warning[deadcode.DeadStores]: Value stored to 'toc' during its initialization is never read
#  180|   //         uint64_t tic = rt_gettime_usecs();
#  181|           while(rt_gettime_usecs() < run_until) load_function();
#  182|->         uint64_t toc = rt_gettime_usecs();
#  183|   
#  184|           // now wait for the period to end

Error: CPPCHECK_WARNING: [#def167]
libffado-2.4.8-build/libffado-2.4.8/tests/test-avccmd.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def168]
libffado-2.4.8-build/libffado-2.4.8/tests/test-avccmd.cpp:264:12: warning[deadcode.DeadStores]: Although the value stored to 'tmpresult' is used in the enclosing expression, the value is never actually read from 'tmpresult'
#  262|       bool tmpresult=true;
#  263|       nargs=0;
#  264|->     while((tmpresult=de.read(&args[nargs]))) {
#  265|           nargs++;
#  266|       }

Error: CPPCHECK_WARNING: [#def169]
libffado-2.4.8-build/libffado-2.4.8/tests/test-bufferops.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def170]
libffado-2.4.8-build/libffado-2.4.8/tests/test-cycle-time.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def171]
libffado-2.4.8-build/libffado-2.4.8/tests/test-dice-eap.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def172]
libffado-2.4.8-build/libffado-2.4.8/tests/test-echomixer.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def173]
libffado-2.4.8-build/libffado-2.4.8/tests/test-ffado.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def174]
libffado-2.4.8-build/libffado-2.4.8/tests/test-focusrite.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def175]
libffado-2.4.8-build/libffado-2.4.8/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;

Error: CLANG_WARNING: [#def176]
libffado-2.4.8-build/libffado-2.4.8/tests/test-focusrite.cpp:191:34: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
#  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;

Error: CPPCHECK_WARNING: [#def177]
libffado-2.4.8-build/libffado-2.4.8/tests/test-ieee1394service.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def178]
libffado-2.4.8-build/libffado-2.4.8/tests/test-ieee1394service.cpp:149:9: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  147|           // read the CTR 'raw' from a handle
#  148|           // and read it from the 1394 service, which uses a DLL
#  149|->         err = raw1394_read_cycle_timer(m_handle, &cycle_timer2, &local_time2);
#  150|           err = raw1394_read_cycle_timer(m_handle, &cycle_timer, &local_time);
#  151|           

Error: CPPCHECK_WARNING: [#def179]
libffado-2.4.8-build/libffado-2.4.8/tests/test-messagequeue.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def180]
libffado-2.4.8-build/libffado-2.4.8/tests/test-scs.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def181]
libffado-2.4.8-build/libffado-2.4.8/tests/test-scs.cpp:233:13: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'm_input_handler'
#  231|           }
#  232|           if(!m_input_handler->init(m_name)) {
#  233|->             debugError("Could not init input message handler\n");
#  234|               return false;
#  235|           }

Error: CLANG_WARNING: [#def182]
libffado-2.4.8-build/libffado-2.4.8/tests/test-scs.cpp:479:83: warning[core.CallAndMessage]: Called C++ object pointer is null
#  477|           GenericAVC::Stanton::ScsDevice* scsDevice = dynamic_cast<GenericAVC::Stanton::ScsDevice*>(device);
#  478|           if(scsDevice == NULL) {
#  479|->             printMessage("Device %d (GUID: %s) is not a Stanton SCS device\n", i, device->getConfigRom().getGuidString().c_str() );
#  480|           } else {
#  481|               printMessage("Device %d (GUID: %s) is a Stanton SCS device\n", i, device->getConfigRom().getGuidString().c_str() );

Error: CPPCHECK_WARNING: [#def183]
libffado-2.4.8-build/libffado-2.4.8/tests/test-timestampedbuffer.cpp: 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-49.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibffado-2.4.8-5.fc41
store-results-to/tmp/tmp7jfx3bc6/libffado-2.4.8-5.fc41.tar.xz
time-created2024-07-03 14:41:53
time-finished2024-07-03 14:45:05
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp7jfx3bc6/libffado-2.4.8-5.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp7jfx3bc6/libffado-2.4.8-5.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9