Menu

#4 Always wrong condition: pAssert(alg == 0 && alg != 0);

1.0
closed
nobody
None
2020-02-24
2017-01-19
Michael Nix
No

In the file AlgorithmTests.c there is the line: pAssert(alg == 0 && alg != 0); at 313.

This is always wrong. Might be a bug/typo?

Discussion

  • Ken Goldman

    Ken Goldman - 2017-01-27

    I don't think it's wrong. pAssert() is a way to handle "the program should never get here" debug checks. I suspect this was an attempt to eliminate a warning with some compiler. I'm checking with the coder of that function, but I suspect pAssert(0); will work.

     
  • Ken Goldman

    Ken Goldman - 2020-02-24
    • status: open --> closed
     

Log in to post a comment.