Menu

#722 directorymonitor.cpp:363: bad erase ?

Undefined
applied
None
Patch
2018-09-11
2018-08-14
dcb
No

directorymonitor.cpp:363] -> [directorymonitor.cpp:372]: (error) Iterator 'it' used after element has been erased.
directorymonitor.cpp:405] -> [directorymonitor.cpp:411]: (error) Iterator 'it' used after element has been erased.

Discussion

  • Teodor Petrov

    Teodor Petrov - 2018-08-14

    Can you share a bit more details?
    Like which tool is generating this errors?
    Which revision are you static analysing and so on?

     
  • Miguel Gimenez

    Miguel Gimenez - 2018-08-14

    This is a possible patch, valid for C++11 and newer.

     
  • Teodor Petrov

    Teodor Petrov - 2018-08-14
    • Type: Undefined --> Patch
     
  • Teodor Petrov

    Teodor Petrov - 2018-08-14

    Yes, it is possible patch...

     
  • dcb

    dcb - 2018-08-14

    Like which tool is generating this errors?

    cppcheck. From sourceforge. Recommended for all C/C++ code.

     
  • Teodor Petrov

    Teodor Petrov - 2018-09-11
    • status: open --> applied
    • assigned_to: Teodor Petrov
     
  • Teodor Petrov

    Teodor Petrov - 2018-09-11

    Applied, thanks for the contribution

     

Log in to post a comment.

MongoDB Logo MongoDB