Changes between Version 3 and Version 4 of Guidelines/WarningsGuidelines


Ignore:
Timestamp:
Sep 1, 2010, 8:46:46 AM (12 years ago)
Author:
Paul A. Bristow
Comment:

changed to "declare it as an unsigned type"

Legend:

Unmodified
Added
Removed
Modified
  • Guidelines/WarningsGuidelines

    v3 v4  
    396396    declare the signed one as an unsigned equivalent, (perhaps size_t).  In
    397397    general, if you don't intend for a variable to ever have negative values,
    398     take advantage of the diagnostic capabilities of the compiler and don't
    399     declare it as an unsigned type.  After you've done this, if you see the
     398    take advantage of the diagnostic capabilities of the compiler and
     399    declare it as an unsigned type, often size_t.  After you've done this, if you see the
    400400    warning again for one of these same variables, it is warning you of this
    401401    same danger again.