Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void uteTestRunner::StressBayer(uint32 iFlags)
- {
- ...
- static EPixelFormat ms_pfList[] =
- { PF_Lub, PF_Lus, PF_Li, PF_Lf, PF_Ld };
- const int fsize = sizeof(ms_pfList) / sizeof(ms_pfList);
- static EBayerMatrix ms_bmList[] =
- { BM_GRBG, BM_GBRG, BM_RGGB, BM_BGGR, BM_None };
- const int bsize = sizeof(ms_bmList) / sizeof(ms_bmList);
- ...
- }
- This is what should have been written here: sizeof(ms_pfList) / sizeof(ms_pfList[0]) and sizeof(ms_bmList) / sizeof(ms_bmList[0]).
- This suspicious code was found in eLynxSDK project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions to the left and to the right of the '/' operator: sizeof (ms_pfList) / sizeof (ms_pfList) IFF plugins engine.cpp 955
- 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