Menu

Help with warning

Marc Zim
2022-06-03
2022-06-03
  • Marc Zim

    Marc Zim - 2022-06-03

    Hello,

    I have a warning I don't understand with attached cpp:

    new4.cpp:10:23: style: Variable 'icoin[nb]' is assigned a value that is never used. [unreadVariable]
    icoin[nb] = i;

    I've debugged it and values of icoin from index 0 to 6 are indeed used...

    Thanks for helping me sorting this out.

    PS: don't try to make sense of this code ;)

     
  • Marc Zim

    Marc Zim - 2022-06-03

    command line to reproduce the problem: cppcheck new4.cpp --enable=all

     
  • CHR

    CHR - 2022-06-03

    Thanks for reporting, tiket is here: https://trac.cppcheck.net/ticket/11125

     

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.