Advertisement
PVS-StudioWarnings

PVS-Studio warning V559 for OpenDDS

Nov 24th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. int
  2. ACE_TMAIN(int, ACE_TCHAR*[])
  3. {
  4.   ....
  5.   TEST_ASSERT(dsqp.service_cleanup_delay.sec = 4);
  6.   TEST_ASSERT(dsqp.service_cleanup_delay.nanosec = 2000);
  7.   TEST_ASSERT(dsqp.history_kind == KEEP_LAST_HISTORY_QOS);
  8.   TEST_ASSERT(dsqp.history_depth == 172);
  9.   TEST_ASSERT(dsqp.max_samples == 389);
  10.   TEST_ASSERT(dsqp.max_instances == 102);
  11.   TEST_ASSERT(dsqp.max_samples_per_instance == 20);
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in OpenDDS project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V559 Suspicious assignment inside the condition expression of 'if' operator: dsqp.service_cleanup_delay.sec = 4. ut_parameterlistconverter.cpp 1295
  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
Advertisement