Advertisement
PVS-StudioWarnings

PVS-Studio warning V521 for IPP Samples

Nov 21st, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. static int DTMF_16s(const Ipp16s *pBuffer, int nbytes,
  2.                     USC_ToneID *toneRes,
  3.                     DTMFState_16s *pIppTDParams)
  4. {
  5.   ...
  6.   for (i = pIppTDParams->dtmf_fs, j = 0;
  7.        i < dtmf_frame_size+pIppTDParams->dtmf_fs, j < nbytes;
  8.        i++, j++)
  9.   ...
  10. }
  11.  
  12. The && operator should be used in the loop condition.
  13.  
  14. This suspicious code was found in IPP Samples project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V521 Such expressions using the ',' operator are dangerous. Make sure the expression is correct. speech usc_dtmf.c 309
  17.  
  18. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement