PVS-StudioWarnings

PVS-Studio warning V595 for IPP Samples

Nov 19th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. Status AVSEncFusionCore::Init(Ipp32u numThreads,
  2.                               BaseCodecParams *pParams)
  3. {
  4.   m_pAVSCompressorParams =
  5.     DynamicCast<AVSVideoEncoderParams> (pParams);
  6.   ...
  7.   m_qp = m_pAVSCompressorParams->m_iConstQuant;
  8.  
  9.   // check error(s)
  10.   if (NULL == m_pAVSCompressorParams)
  11.     return UMC_ERR_NULL_PTR;
  12.   ...
  13. }
  14.  
  15. This suspicious code was found in IPP Samples project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V595 The 'm_pAVSCompressorParams' pointer was utilized before it was verified against nullptr. Check lines: 88, 91. avs_enc umc_avs_enc_fusion_core.cpp 88
  18.  
  19. 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