PVS-StudioWarnings

PVS-Studio warning V593 for TortoiseGIT

Nov 19th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. int git_object_lookup_bypath(....)
  2. {
  3.   int error = -1;
  4.   ....
  5.   if (
  6.     (error = git_object_peel((git_object**)&tree,
  7.                              treeish, GIT_OBJ_TREE) < 0) ||
  8.     (error = git_tree_entry_bypath(&entry, tree, path)) < 0)
  9.   {
  10.     goto cleanup;
  11.   }
  12.   ....
  13. cleanup:
  14.   git_tree_entry_free(entry);
  15.   git_tree_free(tree);
  16.   return error;
  17. }
  18.  
  19. This suspicious code was found in TortoiseGIT project by PVS-Studio static code analyzer.
  20. Warning message is:
  21. V593 Consider reviewing the expression of the 'A = B < C' kind. The expression is calculated as following: 'A = (B < C)'. object.c 378
  22.  
  23. 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