Menu

latest cppcheck: uninitvar FPs

Martin
2021-05-18
2021-05-21
  • Martin

    Martin - 2021-05-18

    Hi,

    with cppcheck head (bde8b4316ece8fc8d296e30547f79f0eefa6fe91) currently the following new uninitvar FPs occur, could you please check:

    Checking /home/user/Desktop/21-05-18.cpp ...
    /home/user/Desktop/21-05-18.cpp:5:10: error: Uninitialized variable: maxResults [uninitvar]
    size_t maxResults = :🅰🅱:c::d::ef::MAX;
    ^
    /home/user/Desktop/21-05-18.cpp:11:34: error: Uninitialized variable: dayValid [uninitvar]
    for (auto& isDayValid : dayValid)
    ^
    /home/user/Desktop/21-05-18.cpp:18:25: error: Uninitialized variable: [ [uninitvar]
    if (dayValid[days])
    ^

    The second finding might be counted as correct, although in the context of this code I think it wouldn't have to be fixed.
    The file is attached.

    Thanks,
    Martin

     
  • Daniel Marjamäki

    For the first FP I created https://trac.cppcheck.net/ticket/10281

     
  • Daniel Marjamäki

    The other FP was fixed by ca5fab8219d12dbae633904c7bddaf9a941f1bdc

     
  • Martin

    Martin - 2021-05-21

    I can confirm, all FPs are fixed. Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.