Changes between Version 3 and Version 4 of Guidelines/Warnings/Microsoft


Ignore:
Timestamp:
Sep 3, 2010, 11:55:25 AM (12 years ago)
Author:
Daniel James
Comment:

Try using headers instead of definition lists, with a parameter to PageOutline to avoid including them.

Legend:

Unmodified
Added
Removed
Modified
  • Guidelines/Warnings/Microsoft

    v3 v4  
    11= Microsoft Warnings =
    22
    3 [[PageOutline]]
     3[[PageOutline(1-2)]]
    44
    55== C4100 - Unreferenced formal parameter == #c4100
    66
    7  Suggestion::
    8     Either surround the parameter with C comments (for example: `int /* my_variable */`) or just delete if the variable name is uninformative. If in other's module(s), or you are too busy/idle, at least suppress warning. In generic code you might not be able to comment the variable name as it might actually be used to call a static function. In this case simply referencing the variable (`varname;`) in the function body eliminates the warning.
    9  Suppression::
    10     `#  pragma warning(disable: 4100) // 'name' : unreferenced formal parameter`
     7=== Suggestion ===
     8
     9Either surround the parameter with C comments (for example: `int /* my_variable */`) or just delete if the variable name is uninformative. If in other's module(s), or you are too busy/idle, at least suppress warning. In generic code you might not be able to comment the variable name as it might actually be used to call a static function. In this case simply referencing the variable (`varname;`) in the function body eliminates the warning.
     10
     11=== Suppression ===
     12
     13`#  pragma warning(disable: 4100) // 'name' : unreferenced formal parameter`
    1114
    1215== C4127 - Conditional expression is constant == #c4127
    1316
    14  Suggestion::
    15     Very common and many believe unhelpful, but a few find it informative, so do not suppress globally.  Even `while(true)` can trigger this! `while(true)` can be rewritten as `for(;;)` eliminating the warning.
    16  Suppression::
    17     `#  pragma warning(disable: 4127) // conditional expression is constant.`
     17=== Suggestion ===
     18
     19Very common and many believe unhelpful, but a few find it informative, so do not suppress globally.  Even `while(true)` can trigger this! `while(true)` can be rewritten as `for(;;)` eliminating the warning.
     20
     21=== Suppression ===
     22
     23`#  pragma warning(disable: 4127) // conditional expression is constant.`