netease-docs/Design/cppCheck/netease_voice-cppcheck-buil.../record.a1

102 lines
6.4 KiB
XML

<?xml version="1.0"?>
<analyzerinfo checksum="3713752904">
<error id="variableScope" severity="style" msg="The scope of the variable &apos;readLen&apos; can be reduced." verbose="The scope of the variable &apos;readLen&apos; can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for &apos;i&apos; can be reduced:\012void f(int x)\012{\012 int i = 0;\012 if (x) {\012 // it&apos;s safe to move &apos;int i = 0;&apos; here\012 for (int n = 0; n &lt; 10; ++n) {\012 // it is possible but not safe to move &apos;int i = 0;&apos; here\012 do_something(&amp;i);\012 }\012 }\012}\012When you see this message it is always safe to reduce the variable scope 1 level." cwe="398">
<location file0="G:\SmartAudio\package\netease\netease_voice\src\record.c" file="G:\SmartAudio\package\netease\netease_voice\src\record.c" line="78"/>
</error>
<error id="variableScope" severity="style" msg="The scope of the variable &apos;ret&apos; can be reduced." verbose="The scope of the variable &apos;ret&apos; can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for &apos;i&apos; can be reduced:\012void f(int x)\012{\012 int i = 0;\012 if (x) {\012 // it&apos;s safe to move &apos;int i = 0;&apos; here\012 for (int n = 0; n &lt; 10; ++n) {\012 // it is possible but not safe to move &apos;int i = 0;&apos; here\012 do_something(&amp;i);\012 }\012 }\012}\012When you see this message it is always safe to reduce the variable scope 1 level." cwe="398">
<location file0="G:\SmartAudio\package\netease\netease_voice\src\record.c" file="G:\SmartAudio\package\netease\netease_voice\src\record.c" line="101"/>
</error>
<FileInfo check="CheckUnusedFunctions">
<functiondecl functionName="QueueReadThread" lineNumber="76"/>
<functiondecl functionName="RecordThread" lineNumber="99"/>
<functiondecl functionName="Neteasae_record_start" lineNumber="129"/>
<functiondecl functionName="_record_stop" lineNumber="234"/>
<functiondecl functionName="Netease_record_stop" lineNumber="267"/>
<functioncall functionName="EPIPE"/>
<functioncall functionName="NETEASE_ERROR_FAIL"/>
<functioncall functionName="NETEASE_ERROR_OPEN_FILE"/>
<functioncall functionName="NETEASE_ERROR_OUT_OF_MEMORY"/>
<functioncall functionName="NETEASE_SUCCESS"/>
<functioncall functionName="NULL"/>
<functioncall functionName="QueueReadThread"/>
<functioncall functionName="RecordData"/>
<functioncall functionName="RecordThread"/>
<functioncall functionName="SCHED_RR"/>
<functioncall functionName="SND_PCM_ACCESS_RW_INTERLEAVED"/>
<functioncall functionName="SND_PCM_FORMAT_S24_LE"/>
<functioncall functionName="SND_PCM_STREAM_CAPTURE"/>
<functioncall functionName="_record_stop"/>
<functioncall functionName="audio_cb"/>
<functioncall functionName="audio_queue_t"/>
<functioncall functionName="buff_size"/>
<functioncall functionName="buffer"/>
<functioncall functionName="cb"/>
<functioncall functionName="channels"/>
<functioncall functionName="continue"/>
<functioncall functionName="data_buff"/>
<functioncall functionName="device_name"/>
<functioncall functionName="dir"/>
<functioncall functionName="error"/>
<functioncall functionName="exit"/>
<functioncall functionName="fprintf"/>
<functioncall functionName="frames"/>
<functioncall functionName="free"/>
<functioncall functionName="handle"/>
<functioncall functionName="if"/>
<functioncall functionName="int"/>
<functioncall functionName="malloc"/>
<functioncall functionName="memset"/>
<functioncall functionName="n_debug"/>
<functioncall functionName="n_error"/>
<functioncall functionName="n_toast"/>
<functioncall functionName="param"/>
<functioncall functionName="params"/>
<functioncall functionName="period_size"/>
<functioncall functionName="printf"/>
<functioncall functionName="pthread_attr_init"/>
<functioncall functionName="pthread_attr_setschedparam"/>
<functioncall functionName="pthread_attr_setschedpolicy"/>
<functioncall functionName="pthread_create"/>
<functioncall functionName="pthread_join"/>
<functioncall functionName="queue"/>
<functioncall functionName="queue_buff"/>
<functioncall functionName="queue_destroy"/>
<functioncall functionName="queue_init"/>
<functioncall functionName="queue_read"/>
<functioncall functionName="queue_write"/>
<functioncall functionName="rate"/>
<functioncall functionName="rc"/>
<functioncall functionName="readLen"/>
<functioncall functionName="record"/>
<functioncall functionName="record_hd"/>
<functioncall functionName="recordata"/>
<functioncall functionName="ret"/>
<functioncall functionName="runing"/>
<functioncall functionName="sched_get_priority_max"/>
<functioncall functionName="size"/>
<functioncall functionName="sizeof"/>
<functioncall functionName="snd_pcm_close"/>
<functioncall functionName="snd_pcm_drain"/>
<functioncall functionName="snd_pcm_hw_params"/>
<functioncall functionName="snd_pcm_hw_params_alloca"/>
<functioncall functionName="snd_pcm_hw_params_any"/>
<functioncall functionName="snd_pcm_hw_params_get_period_size"/>
<functioncall functionName="snd_pcm_hw_params_set_access"/>
<functioncall functionName="snd_pcm_hw_params_set_channels"/>
<functioncall functionName="snd_pcm_hw_params_set_format"/>
<functioncall functionName="snd_pcm_hw_params_set_period_size_near"/>
<functioncall functionName="snd_pcm_hw_params_set_rate_near"/>
<functioncall functionName="snd_pcm_open"/>
<functioncall functionName="snd_pcm_prepare"/>
<functioncall functionName="snd_pcm_readi"/>
<functioncall functionName="snd_strerror"/>
<functioncall functionName="stderr"/>
<functioncall functionName="thread_attr"/>
<functioncall functionName="thread_param"/>
<functioncall functionName="tid_pcm_read"/>
<functioncall functionName="tid_queue_read"/>
<functioncall functionName="val"/>
<functioncall functionName="while"/>
</FileInfo>
</analyzerinfo>