netease-docs/Design/cppCheck/SmartAudio-cppcheck-build-dir/ota.a1

321 lines
20 KiB
XML

<?xml version="1.0"?>
<analyzerinfo checksum="2874751166">
<error id="redundantAssignment" severity="style" msg="Variable &apos;fileSize&apos; is reassigned a value before the old one has been used." verbose="Variable &apos;fileSize&apos; is reassigned a value before the old one has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="332"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="331"/>
</error>
<error id="redundantCopy" severity="performance" msg="Buffer &apos;basePath&apos; is being written before its old content has been used." verbose="Buffer &apos;basePath&apos; is being written before its old content has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="575"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="574"/>
</error>
<error id="redundantCopy" severity="performance" msg="Buffer &apos;buf&apos; is being written before its old content has been used." verbose="Buffer &apos;buf&apos; is being written before its old content has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="660"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="659"/>
</error>
<error id="redundantCopy" severity="performance" msg="Buffer &apos;buf&apos; is being written before its old content has been used." verbose="Buffer &apos;buf&apos; is being written before its old content has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="671"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="670"/>
</error>
<error id="redundantCopy" severity="performance" msg="Buffer &apos;buf&apos; is being written before its old content has been used." verbose="Buffer &apos;buf&apos; is being written before its old content has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="685"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="684"/>
</error>
<error id="redundantCopy" severity="performance" msg="Buffer &apos;buf&apos; is being written before its old content has been used." verbose="Buffer &apos;buf&apos; is being written before its old content has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="708"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="707"/>
</error>
<error id="redundantCopy" severity="performance" msg="Buffer &apos;buf&apos; is being written before its old content has been used." verbose="Buffer &apos;buf&apos; is being written before its old content has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="716"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="715"/>
</error>
<error id="redundantCopy" severity="performance" msg="Buffer &apos;buf&apos; is being written before its old content has been used." verbose="Buffer &apos;buf&apos; is being written before its old content has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="1207"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="1206"/>
</error>
<error id="redundantAssignment" severity="style" msg="Variable &apos;ret&apos; is reassigned a value before the old one has been used." verbose="Variable &apos;ret&apos; is reassigned a value before the old one has been used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="1208"/>
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="1204"/>
</error>
<error id="unusedStructMember" severity="style" msg="struct member &apos;IPL_DATA_ITEM::reserved&apos; is never used." verbose="struct member &apos;IPL_DATA_ITEM::reserved&apos; is never used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="64"/>
</error>
<error id="unreadVariable" severity="style" msg="Variable &apos;ret&apos; is assigned a value that is never used." verbose="Variable &apos;ret&apos; is assigned a value that is never used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="254"/>
</error>
<error id="unreadVariable" severity="style" msg="Variable &apos;fileSize&apos; is assigned a value that is never used." verbose="Variable &apos;fileSize&apos; is assigned a value that is never used." cwe="563">
<location file0="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="332"/>
</error>
<error id="purgedConfiguration" severity="information" msg="The configuration &apos;PLATFORM_CPU;PLATFORM_R16&apos; was not checked because its code equals another one." verbose="The configuration &apos;PLATFORM_CPU;PLATFORM_R16&apos; was not checked because its code equals another one.">
<location file="G:\MyProjects\SmartAudio\Modules\OTA\ota.c" line="0"/>
</error>
<FileInfo check="CheckUnusedFunctions">
<functiondecl functionName="__printfOTANotifyCmd" lineNumber="108"/>
<functiondecl functionName="__otaRspStatus" lineNumber="126"/>
<functiondecl functionName="__dlThreadRuntimeCb" lineNumber="157"/>
<functiondecl functionName="__onHttpResponseCb" lineNumber="164"/>
<functiondecl functionName="__onProgressNotifyCb" lineNumber="189"/>
<functiondecl functionName="__printIPLParams" lineNumber="201"/>
<functiondecl functionName="__ReadIPLParams" lineNumber="238"/>
<functiondecl functionName="__Write2NandPartition" lineNumber="292"/>
<functiondecl functionName="__SaveIPLParams" lineNumber="337"/>
<functiondecl functionName="__otaBackupWifi" lineNumber="402"/>
<functiondecl functionName="__otaRunning" lineNumber="421"/>
<functiondecl functionName="__otaFromLocalImage" lineNumber="639"/>
<functiondecl functionName="__isPreDownloader" lineNumber="788"/>
<functiondecl functionName="__otaDownloadImageCb" lineNumber="874"/>
<functiondecl functionName="__dBusDeameonCb" lineNumber="978"/>
<functiondecl functionName="__dBusOnMessage" lineNumber="997"/>
<functiondecl functionName="main" lineNumber="1177"/>
<functiondecl functionName="__printfOTANotifyCmd" lineNumber="108"/>
<functiondecl functionName="__otaRspStatus" lineNumber="126"/>
<functiondecl functionName="__dlThreadRuntimeCb" lineNumber="157"/>
<functiondecl functionName="__onHttpResponseCb" lineNumber="164"/>
<functiondecl functionName="__onProgressNotifyCb" lineNumber="189"/>
<functiondecl functionName="__printIPLParams" lineNumber="201"/>
<functiondecl functionName="__ReadIPLParams" lineNumber="238"/>
<functiondecl functionName="__Write2NandPartition" lineNumber="292"/>
<functiondecl functionName="__SaveIPLParams" lineNumber="337"/>
<functiondecl functionName="__otaBackupWifi" lineNumber="402"/>
<functiondecl functionName="__otaRunning" lineNumber="421"/>
<functiondecl functionName="__otaFromLocalImage" lineNumber="639"/>
<functiondecl functionName="__isPreDownloader" lineNumber="788"/>
<functiondecl functionName="__otaDownloadImageCb" lineNumber="874"/>
<functiondecl functionName="__dBusDeameonCb" lineNumber="978"/>
<functiondecl functionName="__dBusOnMessage" lineNumber="997"/>
<functiondecl functionName="main" lineNumber="1177"/>
<functioncall functionName="CMD_OTA_STATUS"/>
<functioncall functionName="CopyFileWithSize"/>
<functioncall functionName="DBusJsonBoardcastCommand"/>
<functioncall functionName="DBusJsonSendToCommand"/>
<functioncall functionName="DBusWithLibuvInit"/>
<functioncall functionName="ERR_BAD_FILE_SIZE"/>
<functioncall functionName="ERR_BAD_IPL3"/>
<functioncall functionName="ERR_FILE_NOT_EXISTS"/>
<functioncall functionName="ERR_INPUT_PARAMS"/>
<functioncall functionName="ERR_MD5_CHECK_SUM"/>
<functioncall functionName="ERR_MD5_FILE"/>
<functioncall functionName="ERR_NO_INIT_IPL3"/>
<functioncall functionName="ERR_OPEN_FILE"/>
<functioncall functionName="ERR_OTA_NOT_READY"/>
<functioncall functionName="ERR_OTA_PRE_STATR"/>
<functioncall functionName="ERR_OTA_WRITE_BOOT"/>
<functioncall functionName="ERR_OTA_WRITE_IPL3"/>
<functioncall functionName="ERR_OTA_WRITE_PARAMS"/>
<functioncall functionName="ERR_OTA_WRITE_ROOTFS"/>
<functioncall functionName="ERR_READ_FILE"/>
<functioncall functionName="ERR_VERIFY_PARTITION_MD5"/>
<functioncall functionName="EvpMD5HashBuf"/>
<functioncall functionName="EvpMD5HashFile"/>
<functioncall functionName="EvpMD5HashFileV2"/>
<functioncall functionName="FALSE"/>
<functioncall functionName="F_OK"/>
<functioncall functionName="GET_FILE_SIZE"/>
<functioncall functionName="GetDBusDefaultLoop"/>
<functioncall functionName="GetPartitionFreeSize"/>
<functioncall functionName="GetShellExecResult"/>
<functioncall functionName="IHW_bin2hex"/>
<functioncall functionName="InetHttpDlFileAsync"/>
<functioncall functionName="JSON_ENGINE_OTA_REQ"/>
<functioncall functionName="JSON_ENGINE_OTA_RSP"/>
<functioncall functionName="Json2Struct"/>
<functioncall functionName="LOG_Debug"/>
<functioncall functionName="LOG_EX"/>
<functioncall functionName="LOG_EX2"/>
<functioncall functionName="LOG_Error"/>
<functioncall functionName="LOG_Info"/>
<functioncall functionName="LOG_Warn"/>
<functioncall functionName="LogUploadCurLogFile"/>
<functioncall functionName="MAX_PATH"/>
<functioncall functionName="MD5_CHKSUM_LEN"/>
<functioncall functionName="MD5_CHKSUM_STR_LEN"/>
<functioncall functionName="MODULE_CONTROLLER"/>
<functioncall functionName="MODULE_OTA"/>
<functioncall functionName="NORMAL_SETUP"/>
<functioncall functionName="NO_OTA_STATUS_VAL_TAG"/>
<functioncall functionName="NULL"/>
<functioncall functionName="OTA_CURRENT_REBOOT_TIME"/>
<functioncall functionName="OTA_CURRENT_SETUP_MODE"/>
<functioncall functionName="OTA_CURRENT_VERSION"/>
<functioncall functionName="OTA_DECOMPRESS_FILE"/>
<functioncall functionName="OTA_DISK_FULL"/>
<functioncall functionName="OTA_DOWNLOAD_FILE"/>
<functioncall functionName="OTA_DOWNLOAD_PROGRESS"/>
<functioncall functionName="OTA_ERR_CODE"/>
<functioncall functionName="OTA_FILE_INFO"/>
<functioncall functionName="OTA_PARTITION_BOOT"/>
<functioncall functionName="OTA_PARTITION_IPL_BOOT"/>
<functioncall functionName="OTA_PARTITION_IPL_PARAMS"/>
<functioncall functionName="OTA_PARTITION_IPL_ROOTFS"/>
<functioncall functionName="OTA_PARTITION_MAX"/>
<functioncall functionName="OTA_PARTITION_ROOTFS"/>
<functioncall functionName="OTA_REBOOT_SYSTEM"/>
<functioncall functionName="OTA_RSP_STATUS"/>
<functioncall functionName="OTA_SUCCESED"/>
<functioncall functionName="OTA_UNKNOWN_CMD"/>
<functioncall functionName="OTA_UPGRADE_PARTITION"/>
<functioncall functionName="OTA_UPGRADE_START"/>
<functioncall functionName="OTA_VERIFY_FILE"/>
<functioncall functionName="OTA_VERIFY_PARTITION"/>
<functioncall functionName="O_RDWR"/>
<functioncall functionName="O_TRUNC"/>
<functioncall functionName="POTA_DATA_INFO"/>
<functioncall functionName="RECOVERY_SETUP"/>
<functioncall functionName="RunUVLoop"/>
<functioncall functionName="SIZE_1K"/>
<functioncall functionName="SYSTEM_OTA"/>
<functioncall functionName="SYSTEM_OTA_OK"/>
<functioncall functionName="S_IWUSR"/>
<functioncall functionName="SysPointMarkUpload"/>
<functioncall functionName="TRUE"/>
<functioncall functionName="__ReadIPLParams"/>
<functioncall functionName="__SaveIPLParams"/>
<functioncall functionName="__Write2NandPartition"/>
<functioncall functionName="__dBusDeameonCb"/>
<functioncall functionName="__dBusOnMessage"/>
<functioncall functionName="__dlThreadRuntimeCb"/>
<functioncall functionName="__isPreDownloader"/>
<functioncall functionName="__onHttpResponseCb"/>
<functioncall functionName="__onProgressNotifyCb"/>
<functioncall functionName="__otaDownloadImageCb"/>
<functioncall functionName="__otaFromLocalImage"/>
<functioncall functionName="__otaRspStatus"/>
<functioncall functionName="__otaRunning"/>
<functioncall functionName="__printIPLParams"/>
<functioncall functionName="__printfOTANotifyCmd"/>
<functioncall functionName="access"/>
<functioncall functionName="basePath"/>
<functioncall functionName="basename_v2"/>
<functioncall functionName="break"/>
<functioncall functionName="buf"/>
<functioncall functionName="bufCmd"/>
<functioncall functionName="busCmd"/>
<functioncall functionName="continue"/>
<functioncall functionName="curVersion"/>
<functioncall functionName="default"/>
<functioncall functionName="dirPath"/>
<functioncall functionName="dirname_v2"/>
<functioncall functionName="dlInfo"/>
<functioncall functionName="err"/>
<functioncall functionName="fclose"/>
<functioncall functionName="fileInfo"/>
<functioncall functionName="fileSize"/>
<functioncall functionName="fopen"/>
<functioncall functionName="for"/>
<functioncall functionName="free"/>
<functioncall functionName="g_iplInfo"/>
<functioncall functionName="g_isBackupMode"/>
<functioncall functionName="g_isDownloading"/>
<functioncall functionName="g_otaBarrier"/>
<functioncall functionName="g_otaDownloadPath"/>
<functioncall functionName="g_pMainLoop"/>
<functioncall functionName="getline"/>
<functioncall functionName="i"/>
<functioncall functionName="iFinished"/>
<functioncall functionName="if"/>
<functioncall functionName="int"/>
<functioncall functionName="iplItem"/>
<functioncall functionName="long"/>
<functioncall functionName="md5"/>
<functioncall functionName="md5Buf"/>
<functioncall functionName="md5sum"/>
<functioncall functionName="memcmp"/>
<functioncall functionName="memcpy"/>
<functioncall functionName="memset"/>
<functioncall functionName="modAliase"/>
<functioncall functionName="modName"/>
<functioncall functionName="oStatus"/>
<functioncall functionName="otaCmd"/>
<functioncall functionName="otaFileInfo"/>
<functioncall functionName="otaMode"/>
<functioncall functionName="pBackCmd"/>
<functioncall functionName="pCheckSumFile"/>
<functioncall functionName="pChkMD5"/>
<functioncall functionName="pChkPath"/>
<functioncall functionName="pChkSumFile"/>
<functioncall functionName="pChkVal"/>
<functioncall functionName="pCmdRet"/>
<functioncall functionName="pConn"/>
<functioncall functionName="pDlInfo"/>
<functioncall functionName="pDlPath"/>
<functioncall functionName="pFile"/>
<functioncall functionName="pFileName"/>
<functioncall functionName="pFilePath"/>
<functioncall functionName="pIPLInfo"/>
<functioncall functionName="pInfo"/>
<functioncall functionName="pLoop"/>
<functioncall functionName="pMD5Chk"/>
<functioncall functionName="pMD5Str"/>
<functioncall functionName="pMD5Val"/>
<functioncall functionName="pMagicTag"/>
<functioncall functionName="pMsg"/>
<functioncall functionName="pParams"/>
<functioncall functionName="pPartName"/>
<functioncall functionName="pPartPath"/>
<functioncall functionName="pPath"/>
<functioncall functionName="pRdLine"/>
<functioncall functionName="pReqUrl"/>
<functioncall functionName="pTags"/>
<functioncall functionName="pTaskUuid"/>
<functioncall functionName="pToken"/>
<functioncall functionName="pUserData"/>
<functioncall functionName="partName"/>
<functioncall functionName="partSize"/>
<functioncall functionName="puvBarrier"/>
<functioncall functionName="rdSize"/>
<functioncall functionName="remove"/>
<functioncall functionName="result"/>
<functioncall functionName="ret"/>
<functioncall functionName="retCode"/>
<functioncall functionName="return"/>
<functioncall functionName="setupMode"/>
<functioncall functionName="setupStatus"/>
<functioncall functionName="size"/>
<functioncall functionName="sizeof"/>
<functioncall functionName="sleep"/>
<functioncall functionName="sprintf"/>
<functioncall functionName="status"/>
<functioncall functionName="strMD5"/>
<functioncall functionName="strcmp"/>
<functioncall functionName="strcpy"/>
<functioncall functionName="strdup"/>
<functioncall functionName="strlen"/>
<functioncall functionName="strtok"/>
<functioncall functionName="strtoul"/>
<functioncall functionName="switch"/>
<functioncall functionName="system"/>
<functioncall functionName="type"/>
<functioncall functionName="uMemFreeSize"/>
<functioncall functionName="uPercent"/>
<functioncall functionName="url"/>
<functioncall functionName="usleep"/>
<functioncall functionName="utstring_body"/>
<functioncall functionName="utstring_free"/>
<functioncall functionName="utstring_new"/>
<functioncall functionName="utstring_printf"/>
<functioncall functionName="utstring_renew"/>
<functioncall functionName="uvBarrier"/>
<functioncall functionName="uvBuf"/>
<functioncall functionName="uvClose"/>
<functioncall functionName="uvOpen"/>
<functioncall functionName="uvRead"/>
<functioncall functionName="uvSync"/>
<functioncall functionName="uvThread"/>
<functioncall functionName="uvWrite"/>
<functioncall functionName="uv_barrier_destroy"/>
<functioncall functionName="uv_barrier_init"/>
<functioncall functionName="uv_barrier_wait"/>
<functioncall functionName="uv_buf_init"/>
<functioncall functionName="uv_fs_close"/>
<functioncall functionName="uv_fs_fdatasync"/>
<functioncall functionName="uv_fs_open"/>
<functioncall functionName="uv_fs_read"/>
<functioncall functionName="uv_fs_write"/>
<functioncall functionName="uv_thread_create"/>
<functioncall functionName="val"/>
<functioncall functionName="ver"/>
<functioncall functionName="version"/>
<functioncall functionName="while"/>
<functioncall functionName="wrSize"/>
</FileInfo>
</analyzerinfo>