Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void lNormalizeVector_32f_P3IM(Ipp32f *vec[3],
- Ipp32s* mask, Ipp32s len)
- {
- Ipp32s i;
- Ipp32f norm;
- for(i=0; i<len; i++) {
- if(mask<0) continue;
- norm = 1.0f/sqrt(vec[0][i]*vec[0][i]+
- vec[1][i]*vec[1][i]+
- vec[2][i]*vec[2][i]);
- vec[0][i] *= norm; vec[1][i] *= norm; vec[2][i] *= norm;
- }
- }
- This is what should have been written here: if(mask[i]<0) continue;
- This suspicious code was found in IPP Samples project by PVS-Studio static code analyzer.
- Warning message is:
- V503 This is a nonsensical comparison: pointer < 0. ipprsample ippr_sample.cpp 501
- 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