Menu

#2171 Source code: Invalid initialization of members in constructors

open
nobody
None
5
2018-12-31
2018-12-30
Timo Wiren
No

Found these in 18.06 source code:

7z1806-src/CPP/7zip/UI/FileManager/FSFolder.cpp:537: index is assigned to itself, not to the class member.

7z1806-src/CPP/7zip/UI/FileManager/FSFolderCopy.cpp:164: TotalFileSize is assigned to itself, not to the class member.

A fix should probably be to use this->index = index; and this->TotalFileSize = TotalFileSize;

Discussion

  • Igor Pavlov

    Igor Pavlov - 2018-12-31

    Not a bug.
    It's just a trick to disable warnings for unused vaiable.
    I'll change that code.

    What tool/compiler did you use to analyze?

     
    • Timo Wiren

      Timo Wiren - 2018-12-31

      Thanks. I used Cppcheck.

       

Log in to post a comment.

MongoDB Logo MongoDB