Patterns of Human Error - my presentation at the DC ACM

bearophile bearophileHUGS at lycos.com
Fri May 6 15:50:27 PDT 2011


Walter:

> Interestingly, nobody saw all 5 bugs.

A good C lint has caught three of them, plus gives an extra suggestion:

     8      for (i = 0; i <= dim; i++);
diy.c  8  Warning 574:  Signed-unsigned mix with relational
diy.c  8  Info 737:  Loss of sign in promotion from int to unsigned int
diy.c  8  Info 722:  Suspicious use of ;

    14  }
diy.c  14  Warning 533:  function 'find(long *, unsigned int, long)' should return a value (see line 6)
diy.c  14  Info 818:  Pointer parameter 'array' (line 6) could be declared as pointing to const

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list