Advertisement
PVS-StudioWarnings

PVS-Studio warning V519 for dmd-project

Nov 27th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. code *cdcond(elem *e,regm_t *pretregs)
  2. {
  3.   code *cc,*c,*c1,*cnop1,*c2,*cnop2;
  4.   ....
  5.   c2 = codelem(e22,&retregs,FALSE);
  6.   c2 = cat(c1, fixresult(e22,retregs,pretregs));
  7.   ....
  8. }
  9.  
  10. Most likely this is what should be written here: c2 = cat(c2, ....);
  11.  
  12. This suspicious code was found in dmd-project project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V519 The 'c2' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1860, 1861. cod2.c 1861
  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
Advertisement