PVS-StudioWarnings

PVS-Studio warning V560 for FireFlies

Nov 17th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. static size_type const embedded_block = 1;
  2. static size_type const first_block = 8;
  3.  
  4. template
  5. <typename Key, typename T, typename HashCompare, typename A>
  6. void concurrent_hash_map<Key,T,HashCompare,A>::clear() {
  7.   ...
  8.   else if(s == embedded_block && embedded_block != first_block)
  9.   ...
  10. }
  11.  
  12. This suspicious code was found in FireFlies project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V560 A part of conditional expression is always true: embedded_block != first_block. Fireflies concurrent_hash_map.h 1299
  15.  
  16. 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