Menu

Identical conditions not recognized

2015-03-31
2015-04-06
  • Martin Strunz

    Martin Strunz - 2015-03-31

    This will be not detected:
    void func2(void)
    {
    int x = 0;
    int y = 1;
    if (x < 0)
    {
    y++;
    }
    else if (0 > x) // same condition
    {
    y--;
    }
    }
    but I'm not sure if there is already a ticket.

     
  • Daniel Marjamäki

    hmm.. I vaguely think that there is a ticket for such a problem. It's a simple fix so probably it has the "simple" keyword.

     

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.