(file) Return to CodingGuidelines.htm CVS log (file) (dir) Up to [Pegasus] / pegasus / doc

Diff for /pegasus/doc/CodingGuidelines.htm between version 1.1 and 1.2

version 1.1, 2013/01/21 13:43:51 version 1.2, 2013/02/18 14:33:40
Line 98 
Line 98 
         <em>Approved version (Ballot 160).</em>         <em>Approved version (Ballot 160).</em>
     </td>     </td>
   </tr>   </tr>
     <tr>
       <td align="center">3.4</td>
       <td align="center">22 January 2013</td>
       <td align="center">Marek Szermutzky</td>
       <td>Adding section on Unused's (variables,
         arguments, values etc.)</td>
     </tr>
 </table> </table>
 <p>&nbsp;</p> <p>&nbsp;</p>
 <hr> <hr>
Line 576 
Line 583 
       declarations and definitions.</li>       declarations and definitions.</li>
 </ol> </ol>
  
   <h3>Avoiding Unused parameter, variables, values, functions ...</h3>
   <p>In general, avoid unused variables, parameters, values and
     functions. Many compiler come with support to automatically detect
     these, use them. The OpenPegasus build using gcc will flag unused variables
     as errors.
     The Pegasus Architecture team may completely disallow checkin of code that
     generates unused* warnings to CVS in the future.<br>
   </p>
   <ol>
     <li>Avoid unused parameter warnings. In case the function
       signature cannot be changed since the function codes an
       interface, leave the parameter name off in the function
       definition while keeping the parameter type in place. In the
       following example of function <i>main()</i> the parameter <i>argv</i>
       is used later on but parameter <i>argc</i> is not. Do this:<br>
       <pre><code>int main(int, void** argv)
   {
   };</code></pre>
       Not this:<br>
       <pre><code>int main(int argc, void** argv)
   {
   };</code></pre>
     </li>
   </ol>
   
  
 <h2><font color="#000000">Discussion</font></h2> <h2><font color="#000000">Discussion</font></h2>
 <p>Suggestions for additional conventions are listed here for discussion: <p>Suggestions for additional conventions are listed here for discussion:


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2