CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

LINT.H (6158B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 /* $Header: /CounterStrike/LINT.H 1     3/03/97 10:25a Joe_bostic $ */
     17 /***********************************************************************************************
     18  ***              C O N F I D E N T I A L  ---  W E S T W O O D  S T U D I O S               ***
     19  ***********************************************************************************************
     20  *                                                                                             *
     21  *                 Project Name : Command & Conquer                                            *
     22  *                                                                                             *
     23  *                    File Name : LINT.H                                                       *
     24  *                                                                                             *
     25  *                   Programmer : Joe L. Bostic                                                *
     26  *                                                                                             *
     27  *                   Start Date : 03/28/96                                                     *
     28  *                                                                                             *
     29  *                  Last Update : March 28, 1996 [JLB]                                         *
     30  *                                                                                             *
     31  *---------------------------------------------------------------------------------------------*
     32  * Functions:                                                                                  *
     33  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     34 
     35 // overloading data member (e.g., IsToRedraw)
     36 //lint -e1516
     37 
     38 // function distinguishing error (actually not an error when conversion operators are used).
     39 //lint -e1053
     40 
     41 
     42 /*
     43 **	The current version of Lint doesn't know how to deal with conversion operators. It
     44 **	erroneously generates this error message as a result. Unfortunately, we have to throw
     45 **	out the baby with the bathwater on this one.
     46 */
     47 //lint -e58 -e56
     48 
     49 /*
     50 **	Hiding a non virtual member function is generally ok.
     51 */
     52 //lint -e1511
     53 
     54 /*
     55 **	The warning about not initializing a member during construction is
     56 **	valid. However, C&C takes advantage of this by using the in place
     57 **	new operator during the load game process. Disable the warning, but
     58 **	grudgingly.
     59 */
     60 //lint -e1401
     61 
     62 /*
     63 **	Disable warning about non virtual base class destructor for these objects.
     64 */
     65 //lint -esym(1509,GraphicBufferClass,GraphicViewPortClass,BufferClass,VideoViewPortClass,GetCDClass)
     66 //lint -esym(1509,BasicTimerClass,FlyClass,FuseClass,StageClass,FlasherClass,CargoClass,DoorClass)
     67 //lint -esym(1509,AbstractTypeClass)
     68 
     69 /*
     70 ** The "unusual cast" warning is the result of derived casting. This is
     71 ** because there is no "dynamic_cast<>" implemented in Watcom (version 10.5).
     72 */
     73 //lint -e740 -e571
     74 
     75 /*
     76 **	"function not previously declared inline" is probably not worth noting.
     77 */
     78 //lint -e1727
     79 
     80 /*
     81 **	Allow sub-integer loss of precision. This will allow assigning ints to
     82 **	chars without warning.
     83 */
     84 //lint -e734
     85 
     86 /*
     87 **	Shifting an integer left is always ok.
     88 */
     89 //lint -e701 -e703
     90 
     91 /*
     92 **	Allow repeated include files. The body of the include file should be
     93 **	coded to ensure that it is processed only once.
     94 */
     95 //lint -e537
     96 
     97 /*
     98 **	Implicitly converting an enum to an integer is almost always ok.
     99 */
    100 //lint -e641
    101 
    102 /*
    103 **	It is possible to have template functions for "++" and "--" that
    104 **	don't require one of the parameters to be a class object.
    105 */
    106 //lint -e1042
    107 
    108 /*
    109 **	Redundant declarations are ok. They are a bit harder to maintain,
    110 **	but they facilitate keeping modules less interdependant (include
    111 **	file wise).
    112 */
    113 //lint -e963 -e762 -e763
    114 
    115 /*
    116 **	Not having a default constructor is ok.
    117 */
    118 //lint -e1712
    119 
    120 /*
    121 **	Private constructors are ok. In fact, they are necessary if the
    122 **	class object must never be instantiated outside of the class
    123 **	itself.
    124 */
    125 //lint -e1704
    126 
    127 /*
    128 **	Ignoring the return value from a function is ok. It is very
    129 **	common for certain side-effect type functions.
    130 */
    131 //lint -e534
    132 
    133 /*
    134 **	Implicitly converting from a signed to an unsigned parameter (or
    135 **	visa versa) is ok.
    136 */
    137 //lint -e732 -e502 -e713 -e737 -eau
    138 
    139 /*
    140 **	Allow functions to overload and hide base functions. This is a
    141 **	technique of inheritance that handles function parameter changes.
    142 */
    143 //lint -e1411
    144 
    145 /*
    146 **	If a switch statement doesn't have a case for every value (enums)
    147 **	but it does have a "default" case, then don't warn about it.
    148 */
    149 //lint -e788
    150 
    151 /*
    152 **	If bitwize arithmetic is performed on compatible enumeration types,
    153 **	then don't complain. Many enums are used in this fashion.
    154 */
    155 //lint -e655 -e656
    156 
    157 /*
    158 **	If a data member is not explicitly initialized in the initializer
    159 **	list, this is ok.
    160 */
    161 //lint -e1542
    162 
    163 /*
    164 **	Calling "new" when not part of an assignment operation can be valid. This
    165 **	is true if the "new" operator has been overloaded and the class keeps
    166 **	track of itself.
    167 */
    168 //lint -e522
    169 
    170 /*
    171 **	A class that is zero bytes long is ok. This is how method classes
    172 **	usually work.
    173 */
    174 //lint -e1501
    175 
    176 /*
    177 **	Boolean passed to function is ok.
    178 */
    179 //lint -e730
    180 
    181 /*
    182 **	Signed/unsigned mix with relational... ignore for now.
    183 */
    184 //lint -e574
    185