Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
- #define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A)
- int GetAllNeighbors( const CCoreDispInfo *pDisp,
- int iNeighbors[512] )
- {
- ....
- if ( nNeighbors < _ARRAYSIZE( iNeighbors ) )
- iNeighbors[nNeighbors++] = pCorner->m_Neighbors[i];
- ....
- }
- This suspicious code was found in Source SDK project by PVS-Studio static code analyzer.
- Warning message is:
- V511 The sizeof() operator returns size of the pointer, and not of the array, in 'sizeof (iNeighbors)' expression. Vrad_dll disp_vrad.cpp 60
- 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