msg.txt
资源名称:pclint.rar [点击查看]
上传用户:filter2008
上传日期:2010-03-12
资源大小:2959k
文件大小:315k
源码类别:
编辑器/阅读器
开发平台:
C/C++
- 17. MESSAGES
- Most error messages have an associated error number. By looking
- up the number in the list below you can obtain additional
- information about the cause of the error. This information is
- also available from a self-extracting executable msg.exe, found
- on the PC-lint distribution diskette, which produces the
- machine-readable ASCII file msg.txt. For FlexeLint users, the
- file msg.txt can be found on the FlexeLint Supplementary
- diskette.
- Messages numbered 1000 and higher pertain generally to C++.
- This is summarized in the table below.
- After a possible 1000 is subtracted off, the remainder lies in
- the range 0-999. Remainders in the range 1-199 are syntax
- errors, 200-299 are PC-lint/FlexeLint internal errors and should
- never occur, 300-399 are fatal errors usually brought about by
- exceeding some limit, 400-699 are warning messages that indicate
- that something is likely to be wrong with the program being
- examined. Remainders in the range 700-899 designate
- informational messages. These may be errors but they also may
- represent legitimate programming practices depending upon
- personal programming style. Remainders in the range 900-999 are
- called "Elective Notes". They are not automatically output. You
- may examine the list to see if you wish to be alerted to any of
- them.
- C C++ Warning Level
- Syntax Errors 1 - 199 1001 - 1199 1
- Internal Errors 200 - 299 0
- Fatal Errors 300 - 399 0
- Warnings 400 - 699 1400 - 1699 2
- Informational 700 - 899 1700 - 1899 3
- Elective Notes 900 - 999 1900 - 1999 4
- Glossary
- A few of the terms used in the commentary below are:
- argument The actual argument of a function as opposed to a dummy
- (or formal) parameter of a function (see parameter).
- arithmetic any of the integral types (see below) plus float,
- double, and long double.
- Boolean In general, the word Boolean refers to quantities that
- can be either true or false. An expression is said to
- be Boolean (perhaps it would be better to say
- 'definitely Boolean') if it is of the form: operand op
- operand where op is a relational (> >= < <=), an
- equality operator (== !=), logical And (&&) or logical
- Or (||). A context is said to require a Boolean if it
- is used in an if or while clause or if it is the 2nd
- expression of a for clause or if it is an argument to
- one of the operators: && or ||. An expression needn't
- be definitely Boolean to be acceptable in a context
- that requires a Boolean. Any integer or pointer is
- acceptable.
- declaration gives properties about an object or function (as
- opposed to a definition).
- definition that which allocates space for an object or function
- (as opposed to a declaration) and which may also
- indicate properties about the object. There should be
- only one definition for an object but there may be many
- declarations.
- integral a type that has properties similar to integers. These
- include char, short, int, and long and the unsigned
- variations of any of these.
- scalar any of the arithmetic types plus pointers.
- lvalue is an expression that can be used on the Left hand side
- of an assignment operator (=). Some contexts require
- lvalues such as autoincrement (++) and autodecrement
- (--).
- macro an abbreviation defined by a #define statement. It may
- or may not have arguments.
- member elements of a struct and of a union are called members.
- module that which is compiled by a compiler in a single
- independent compilation. It typically includes all the
- text of a .c (or a .cpp or .cxx, etc.) file plus any
- text within any #include file(s).
- parameter A formal parameter of a function as opposed to an
- actual argument (see argument).
- Message Parameters
- Some of the messages are parameterized with one or more of the
- following italicized names:
- Char Some character
- Context Specifies one of several contexts in which an
- assignment can be made. Can be one of:
- o assignment -- refers to an explicit assignment
- operator.
- o return -- refers to the implied assignment of a
- return statement. The type of the expression is
- converted implicitly to the type of the function.
- o initialization -- refers to the assignment
- implied by an initialization statement.
- o arg. no.... -- refers to the implied assignment
- of an argument in the presence of a prototype. The
- type of the expression is implicitly converted to the
- type within a prototype.
- o arg. 'this' -- refers to the implied argument of
- a member function call.
- FileName A filename. Messages containing this parameter can
- be suppressed with the -efile( ... ) option.
- Integer Some integer
- Invocation A function call with argument types. To
- suppress a message containing an Invocation you need
- the complete call, not just the function name. For
- example, the call f(1) could result in Error 1024
- parameterized by 'f(int)'. To suppress this message
- you could use -esym(1024,f(int)). You could also use
- wild cards as in -esym(1024,f*).
- Kind A list of control structures.
- Location A line number followed optionally by a filename (if
- different from the current) and/or a module name if
- different from the current.
- Name A string, usually an identifier, that can be
- suppressed with a -esym but not with -elibsym.
- String A sequence of characters identified further in the
- message description.
- Symbol The name of a user identifier referring to a C or C++
- object such as variable, function, structure, etc.
- Messages containing this parameter can be suppressed
- with the -esym( ... ) option. For C++, if Symbol is
- the name of a function the full function signature
- (including parameters) is given. Error suppression
- with -esym does not require (nor want) the parameters.
- Type A type or a top type base is provided. A top type
- base is one of pointer, function, array, struct, union,
- or enum.
- TypeDiff specifies the way in which one type differs from
- another. Because of type qualification, function
- prototypes, and type compounding, it may not be obvious
- how two types differ. Also, see the -etd option to
- inhibit errors based on type differences. TypeDiff can
- be one or more of:
- o basic -- The two types differ in some
- fundamental way such as double versus int.
- o count -- Two function types differ in the number
- of arguments.
- o ellipsis -- Two function types differ in that
- one is prototyped using an ellipsis and the other is
- not prototyped. See Section 15.
- o incomplete -- At least one of the types is only
- partially specified such as an array without a
- dimension or a function without a prototype.
- o nominal -- The types are nominally different but
- are otherwise the same. For example, int versus long
- where these are the same size or double versus long
- double where these are the same size. The two types
- are either both integral or both float or are functions
- that return types or have arguments that differ
- nominally. If long is the same size as int then
- unsigned long will differ from int both as nominal and
- as signed/unsigned. If not the same size, then the
- difference is precision.
- o origin -- The types are not actually different
- but have different origins. For example a struct is
- defined in two separate modules rather than in one
- header file. If for some reason you want to do this
- then use the option -etd(origin).
- o precision -- Two arithmetic types differ in
- their precision such as int vs. long where these are
- different sizes.
- o promotion -- Two function types differ in that
- one is prototyped with a char, short or float type and
- the other is not prototyped.
- o ptrs to... -- Pointers point to different types,
- some TypeDiff code follows.
- o ptrs to incompatible types -- Pointers point to
- types, which in turn differ in precision, count, size,
- ellipsis or promotion.
- o qualification -- Qualifiers such as const,
- volatile, etc. are inconsistent.
- o signed/unsigned -- The types differ in that one
- is a signed integral type and the other is unsigned of
- the same size, or they are both functions that return
- types that differ in this way, or they are both
- pointers to types that differ in this way.
- o size -- Two arrays differ in array dimension.
- o strong -- two types differ in that one is strong
- and the other is not the same strong type.
- o void/nonvoid -- The two types differ in that one
- is void and the other is not or, more frequently, they
- are both functions returning types that differ in this
- respect or pointers to types that differ in this
- respect.
- o enum/enum-- One type is an enum. The other
- type is a different enum.
- o int/enum-- One type is an enum and the other is
- an int.
- o Type = Type -- The two types in an assignment of
- some kind differ in some basic way and no more
- information is available.
- o Type vs. Type -- The two types differ in some
- basic way and no more information is available.
- 17.1 C Syntax Errors
- 1 Unclosed Comment (Location) -- End of file was reached
- with an open comment still unclosed. The Location of the
- open comment is shown.
- 2 Unclosed Quote -- An end of line was reached and a
- matching quote character (single or double) to an earlier
- quote character on the same line was not found.
- 3 #else without a #if -- A #else was encountered not in the
- scope of a #if, #ifdef or #ifndef.
- 4 Too many #if levels -- An internal limit was reached on
- the level of nesting of #if statements (including #ifdef
- and #ifndef).
- 5 Too many #endif's -- A #endif was encountered not in the
- scope of a #if or #ifdef or #ifndef.
- 6 Stack Overflow -- One of the built-in non-extendable
- stacks has been overextended. The possibilities are too
- many nested #if statements, #includes statements
- (including all recursive #include statements), static
- blocks (bounded by braces) or #define replacements.
- 7 Unable to open include file: FileName -- FileName is the
- name of the include file, which could not be opened. See
- also flag fdi (See Section 5.), option -i... ( See
- Section 5.) and Section 13.2.1 INCLUDE Environment
- Variable.
- 8 Unclosed #if (Location) -- A #if (or #ifdef or #ifndef)
- was encountered without a corresponding #endif. Location
- is the location of the #if.
- 9 Too many #else's in #if (Location) -- A given #if
- contained a #else, which in turn was followed by either
- another #else or a #elif. The error message gives the
- line of the #if statement that started the conditional
- that contained the aberration.
- 10 Expecting 'String' -- String is the expected token. The
- expected token could not be found. This is commonly given
- when certain reserved words are not recognized.
- int __interrupt f();
- will receive an Expecting ';' message at the f because it
- thinks you just declared __interrupt. The cure is to
- establish a new reserved word with +rw(__interrupt).
- Also, make sure you are using the correct compiler options
- file. See also Section 15.10 Strange Compilers.
- 11 Excessive Size -- The filename specified on a #include
- line had a length that exceeded FILENAME_MAX characters.
- 12 Need < or " -- After a #include is detected and after
- macro substitution is performed, a file specification of
- the form <filename> or "filename" is expected.
- 13 Bad type -- A type adjective such as long, unsigned, etc.
- cannot be applied to the type, which follows.
- 14 Symbol 'Symbol' previously defined (Location) -- The
- named object has been defined a second time. The location
- of the previous definition is provided. If this is a
- tentative definition (no initializer) then the message can
- be suppressed with the +fmd flag. (Section 5.5 Flag
- Options).
- 15 Symbol 'Symbol' redeclared (TypeDiff) (Location) -- The
- named symbol has been previously declared or defined in
- some other module (location given) with a type different
- from the type given by the declaration at the current
- location. The parameter TypeDiff provides further infor
- mation on how the types differ (see Glossary in Chapter
- 17. MESSAGES.).
- 16 Unrecognized name -- A # directive is not followed by a
- recognizable word. If this is not an error, use the +ppw
- option. (Section 5.7 Other Options).
- 17 Unrecognized name -- A non-parameter is being declared
- where only parameters should be.
- 18 Symbol 'Symbol' redeclared (TypeDiff) conflicts with
- Location -- A symbol is being redeclared. The parameter
- TypeDiff provides further information on how the types
- differ (see Glossary Chapter 17. MESSAGES.). Location is
- the location of the previous definition.
- 19 Useless Declaration -- A type appeared by itself without
- an associated variable, and the type was not a struct and
- not a union and not an enum. A double semi-colon can
- cause this as in:
- int x;;
- 20 Illegal use of = -- A function declaration was followed
- by an = sign.
- 21 Expected { -- An initializer for an indefinite size array
- must begin with a left brace.
- 22 Illegal operator -- A unary operator was found following
- an operand and the operator is not a post operator.
- 23 Expected colon -- A ? operator was encountered but this
- was not followed by a : as was expected.
- 24 Expected an expression, found 'String' -- An operator was
- found at the start of an expression but it was not a unary
- operator.
- 25 Illegal constant -- Too many characters were encountered
- in a character constant (a constant bounded by ' marks).
- 26 Expected an expression, found 'String' -- An expression
- was not found where one was expected. The unexpected
- token is placed in the message.
- 27 Illegal character (0xhh) -- An illegal character was
- found in the source code. The hex code is provided in the
- message. A blank is assumed. If you are using strange
- characters in identifier names you will get this message
- for which you may use the -ident option. ( See Section
- 5.)
- 28 Redefinition of symbol 'Symbol' Location -- The
- identifier preceding a colon was previously declared at
- the Location given as not being a label.
- 30 Expected a constant -- A constant was expected but not
- obtained. This could be following a case keyword, an
- array dimension, bit field length, enumeration value, #if
- expression, etc.
- 31 Redefinition of symbol 'Symbol' conflicts with Location
- -- A data object or function previously defined in this
- module is being redefined.
- 32 Field size (member 'Symbol') should not be zero -- The
- length of a field was given as non-positive, (0 or
- negative).
- 33 Illegal constant -- A constant was badly formed as when
- an octal constant contains one of the digits 8 or 9.
- 34 Non-constant initializer -- A non-constant initializer
- was found for a static data item.
- 35 Initializer has side-effects -- An initializer with side
- effects was found for a static data item.
- 36 Redefining the storage class of symbol 'Symbol' conflicts
- with Location -- An object's storage class is being
- changed.
- 37 Value of enumerator 'Symbol' inconsistent (conflicts with
- Location) -- An enumerator was inconsistently valued.
- 38 Offset of symbol 'Symbol' inconsistent (Location) -- A
- member of a class or struct appears in a different
- position (offset from the start of the structure) than an
- earlier declaration. This could be caused by array
- dimensions changing from one module to another.
- 39 Redefinition of symbol 'Symbol' conflicts with Location
- -- A struct or union is being redefined.
- 40 Undeclared identifier 'Name' -- Within an expression, an
- identifier was encountered that had not previously been
- declared and was not followed by a left parenthesis. Name
- is the name of the identifier.
- 41 Redefinition of symbol 'Symbol' -- A parameter of either
- a function or a macro is being repeated.
- 42 Expected a statement -- A statement was expected but a
- token was encountered that could not possibly begin a
- statement.
- 43 Vacuous type for variable 'Symbol' -- A vacuous type was
- found such as the void type in a context that expected
- substance.
- 44 Need a switch -- A case or default statement occurred
- outside a switch.
- 45 Bad use of register -- A variable is declared as a
- register but its type is inconsistent with it being a
- register (such as a function).
- 46 Field type should be int -- Bit fields in a structure
- should be typed unsigned or int. If your compiler allows
- other kinds of objects, such as char, then simply suppress
- this message.
- 47 Bad type -- Unary minus requires an arithmetic operand.
- 48 Bad type -- Unary * or the left hand side of the ptr (->)
- operator requires a pointer operand.
- 49 Expected a type -- Only types are allowed within
- prototypes. A prototype is a function declaration with a
- sequence of types within parentheses. The processor is at
- a state where it has detected at least one type within
- parentheses and so is expecting more types or a closing
- right parenthesis.
- 50 Attempted to take the address of a non-lvalue -- Unary &
- operator requires an lvalue (a value suitable for
- placement on the left hand side of an assignment
- operator).
- 51 Expected integral type -- Unary ~ expects an integral
- type (signed or unsigned char, short, int, or long).
- 52 Expected an lvalue -- autodecrement (--) and
- autoincrement (++) operators require an lvalue (a value
- suitable for placement on the left hand side of an
- assignment operator). Remember that casts do not normally
- produce lvalues. Thus
- ++(char *)p;
- is illegal according to the ANSI standard. This construct
- is allowed by some compilers and is allowed if you use the
- +fpc option (Pointer Casts are lvalues). (See Section 5.)
- 53 Expected a scalar -- Autodecrement (--) and autoincrement
- (++) operators may only be applied to scalars (arithmetics
- and pointers) or to objects for which these operators have
- been defined.
- 54 Division by 0 -- The constant 0 was used on the right
- hand side of the division operator (/) or the remainder
- operator (%).
- 55 Bad type -- The context requires a scalar, function,
- array, or struct (unless -fsa).
- 56 Bad type -- Add/subtract operator requires scalar types
- and pointers may not be added to pointers.
- 57 Bad type -- Bit operators ( &, | and ^ ) require integral
- arguments.
- 58 Bad type -- Bad arguments were given to a relational
- operator; these always require two scalars and pointers
- can't be compared with integers (unless constant 0).
- 59 Bad type -- The amount by which an item can be shifted
- must be integral.
- 60 Bad type -- The value to be shifted must be integral.
- 61 Bad type -- The context requires a Boolean. Booleans
- must be some form of arithmetic or pointer.
- 62 Incompatible types (TypeDiff) for operator ':' -- The 2nd
- and 3rd arguments to ? : must be compatible types.
- 63 Expected an lvalue -- Assignment expects its first
- operand to be an lvalue. Please note that a cast removes
- the lvaluedness of an expression. But see also flag +fpc
- in Section 5.5 Flag Options.
- 64 Type mismatch (Context) (TypeDiff) -- There was a
- mismatch in types across an assignment (or implied
- assignment, see Context). TypeDiff specifies the type
- difference. See options -epn, -eps, -epu, -epp (Section
- 5.2 Error Inhibition Options) to suppress this message
- when assigning some kinds of pointers.
- 65 Expected a member name -- After a dot (.) or pointer (->)
- operator a member name should appear.
- 66 Bad type -- A void type was employed where it is not
- permitted. If a void type is placed in a prototype then
- it must be the only type within a prototype. (See error
- number 49.)
- 67 Can't cast from Type to Type -- Attempt to cast a
- non-scalar to an integral.
- 68 Can't cast from Type to Type -- Attempt to cast a
- non-arithmetic to a float.
- 69 Can't cast from Type to Type -- Bad conversion involving
- incompatible structures or a structure and some other
- object.
- 70 Can't cast from Type to Type -- Attempt to cast to a
- pointer from an unusual type (non-integral).
- 71 Can't cast from Type to Type -- Attempt to cast to a type
- that does not allow conversions.
- 72 Bad option 'String' -- Was not able to interpret an
- option. The option is given in String.
- 73 Bad left operand -- The cursor is positioned at or just
- beyond either an -> or a . operator. These operators
- expect an expression primary on their left. Please
- enclose any complex expression in this position within
- parentheses.
- 74 Address of Register -- An attempt was made to apply the
- address (&) operator to a variable whose storage class was
- given as register.
- 75 Too late to change sizes (option 'String') -- The size
- option was given after all or part of a module was
- processed. Make sure that any option to reset sizes of
- objects be done at the beginning of the first module
- processed or on the command line before any module is
- processed.
- 76 can't open file String -- String is the name of the
- file. The named file could not be opened for output. The
- file was destined to become a PC-lint/FlexeLint object
- module.
- 77 Address of bit-field cannot be taken -- The address of a
- bit-field cannot be taken. The rules of C only allow for
- taking the address of a whole byte (a whole char).
- 78 Symbol 'Symbol' typedef'ed at Location used in expression
- -- The named symbol was defined in a typedef statement and
- is therefore considered a type. It was subsequently found
- in a context where an expression was expected.
- 79 Bad type for % operator -- The % operator should be used
- with some form of integer.
- 80 this use of ellipsis is not strictly ANSI -- The ellipsis
- should be used in a prototype only after a sequence of
- types not after a sequence of identifiers. Some compilers
- support this extension. If you want to use this feature
- suppress this message.
- 81 struct/union not permitted in equality comparison -- Two
- struct's or union's are being compared with one of == or
- !=. This is not permitted by the ANSI standard. If your
- compiler supports this, suppress this message.
- 82 return <exp>; illegal with void function -- The ANSI
- standard does not allow an expression form of the return
- statement with a void function. If you are trying to cast
- to void as in return (void)f(); and your compiler allows
- it, suppress this message.
- 83 Incompatible pointer types with subtraction -- Two
- pointers being subtracted have indirect types which
- differ. You can get PC-lint/FlexeLint to ignore slight
- differences in the pointers by employing one or more of
- the -ep... options described in Section 5.2 Error
- Inhibition Options.
- 84 sizeof object is zero or object is undefined -- A sizeof
- returned a 0 value. This could happen if the object were
- undefined or incompletely defined. Make sure a complete
- definition of the object is in scope when you use sizeof.
- 85 Array 'Symbol' has dimension 0 -- An array (named Symbol)
- was declared without a dimension in a context that
- required a non-zero dimension.
- 86 Structure 'Symbol' has no data elements -- A structure
- was declared (in a C module) that had no data members.
- Though legal in C++ this is not legal C.
- 87 Expression too complicated for #ifdef or #ifndef -- By
- the rules of C there should be only a single identifier
- following a #ifdef or a #ifndef. You may also supply a
- validly constructed C (or C++) comment.
- 88 Symbol 'Symbol' is an array of empty elements -- An array
- was declared (in a C module) whose elements were each of 0
- length. Though legal in C++ this is not permitted C.
- 90 Option 'String' is only appropriate within a lint comment
- -- The indicated option is not appropriate at the command
- or the .lnt level. For example if -unreachable is given
- on the command line you will get this message.
- 91 Line exceeds Integer characters (use +linebuf) -- A line
- read from one of the input files is longer than
- anticipated. By default the line buffer size is 600
- characters. Each time you use the +linebuf option you can
- double this size. The size can be doubled ad infinitum.
- 92 Negative array dimension or bit field length (Integer) --
- A negative array dimension or bit field length is not
- permitted.
- 93 New-line is not permitted within string arguments to
- macros -- A macro invocation contains a string that is
- split across more than one line. For example:
- A( "Hello
- World" );
- will trigger this message. Some compilers accept this
- construct and you can suppress this message with -e93 if
- this is your current practice. But it is more portable to
- place the string constant on one line. Thus
- A( "Hello World" );
- would be better.
- 101 Expected an identifier -- While processing a function
- declarator, a parameter specifier was encountered that was
- not an identifier, whereas a prior parameter was specified
- as an identifier. This is mixing old-style function
- declarations with the new-style and is not permitted. For
- example
- void f(n,int m)
- will elicit this message.
- 102 Illegal parameter specification -- Within a function
- declarator, a parameter must be specified as either an
- identifier or as a type followed by a declarator.
- 103 Unexpected declaration -- After a prototype, only a
- comma, semi-colon, right parenthesis or a left brace may
- occur. This error could occur if you have omitted a
- terminating character after a declaration or if you are
- mixing old-style parameter declarations with new-style
- prototypes.
- 104 Conflicting types -- Two consecutive conflicting types
- were found such as int followed by double. Remove one of
- the types!
- 105 Conflicting modifiers -- Two consecutive conflicting
- modifiers were found such as far followed by near. Remove
- one of the modifiers!
- 106 Illegal constant -- A string constant was found within a
- preprocessor expression as in
- #if ABC == "abc"
- Such expressions should be integral expressions.
- 107 Label 'Symbol' (Location) not defined -- The Symbol at
- the given Location appeared in a goto but there was no
- corresponding label.
- 108 Invalid context -- A continue or break statement was
- encountered without an appropriate surrounding context
- such as a for, while, or do loop or, for the break
- statement only, a surrounding switch statement.
- 110 Attempt to assign to void -- An attempt was made to
- assign a value to an object designated (possibly through a
- pointer) as void.
- 111 Assignment to const object -- An object declared as const
- was assigned a value. This could arise via indirection.
- For example, if p is a pointer to a const int then
- assigning to *p will raise this error.
- 113 Inconsistent enum declaration -- The sequence of members
- within an enum (or their values) is inconsistent with that
- of another enum (usually in some other module) having the
- same name.
- 114 Inconsistent structure declaration for tag 'Symbol' --
- The sequence of members within a structure (or union) is
- inconsistent with another structure (usually in some other
- module) having the same name.
- 115 Struct/union not defined -- A reference to a structure or
- a union was made that required a definition and there is
- no definition in scope. For example, a reference to p->a
- where p is a pointer to a struct that had not yet been
- defined in the current module.
- 116 Inappropriate storage class -- A storage class other than
- register was given in a section of code that is dedicated
- to declaring parameters. The section is that part of a
- function preceding the first left brace.
- 117 Inappropriate storage class -- A storage class was
- provided outside any function that indicated either auto
- or register. Such storage classes are appropriate only
- within functions.
- 118 Too few arguments for prototype -- The number of
- arguments provided for a function was less than the number
- indicated by a prototype in scope.
- 119 Too many arguments for prototype -- The number of
- arguments provided for a function was greater than the
- number indicated by a prototype in scope.
- 122 Digit (Char) too large for radix -- The indicated
- character was found in a constant beginning with zero.
- For example, 08 is accepted by some compilers to represent
- 8 but it should be 010 or plain 8.
- 123 Macro 'Symbol' defined with arguments at Location this is
- just a warning -- The name of a macro defined with
- arguments was subsequently used without a following '('.
- This is legal but may be an oversight. It is not uncommon
- to suppress this message (with -e123), because some
- compilers allow, for example, the macro max() to coexist
- with a variable max. ( See Section 15.).
- 124 Pointer to void not allowed -- A pointer to void was used
- in a context that does not permit void. This includes
- subtraction, addition and the relationals (> >= < <=).
- 125 Too many storage class specifiers -- More than one
- storage class specifier (static, extern, typedef, register
- or auto) was found. Only one is permitted.
- 126 Inconsistent structure definition 'Symbol' -- The named
- structure (or union or enum) was inconsistently defined
- across modules. The inconsistency was recognized while
- processing a lint object module. Line number information
- was not available with this message. Alter the structures
- so that the member information is consistent.
- 127 Illegal constant -- An empty character constant ('') was
- found.
- 128 Pointer to function not allowed -- A pointer to a
- function was found in an arithmetic context such as
- subtraction, addition, or one of the relationals (> >= <
- <=).
- 129 declaration expected, identifier 'Symbol' ignored -- In a
- context in which a declaration was expected an identifier
- was found. Moreover, the identifier was not followed by
- '(' or a '['
- 130 Expected integral type -- The expression in a switch
- statement must be some variation of an int (possibly long
- or unsigned) or an enum.
- 131 syntax error in call of macro 'Symbol' at location
- Location -- This message is issued when a macro with
- arguments (function-like macro) is invoked and an
- incorrect number of arguments is provided. Location is
- the location of the start of the macro call. This can be
- useful because an errant macro call can extend over many
- lines.
- 132 Expected function definition -- A function declaration
- with identifiers between parentheses is the start of an
- old-style function definition (K&R style). This is
- normally followed by optional declarations and a left
- brace to signal the start of the function body. Either
- replace the identifier(s) with type(s) or complete the
- function with a function body.
- 133 Too many initializers for aggregate -- In a
- brace-enclosed initializer, there are more items than
- there are elements of the aggregate.
- 134 Missing initializer -- An initializer was expected but
- only a comma was present.
- 135 comma assumed in initializer -- A comma was missing
- between two initializers. For example:
- int a[2][2] = { { 1, 2 } { 3, 4 } };
- is missing a comma after the first right brace (}).
- 136 Illegal macro name -- The ANSI standard restricts the use
- of certain names as macros. defined is on the restricted
- list.
- 137 constant 'Symbol' used twice within switch -- The
- indicated constant was used twice as a case within a
- switch statement. Currently only enumerated types are
- checked for repeated occurrence.
- 138 Can't add parent 'Symbol' to strong type String; creates
- loop -- An attempt was made to add a strong type parent
- to a typedef type. The attempt is either explicit (with
- the -strong option) or implicit with the use of a typedef
- to a known strong type. This attempt would have caused a
- loop in the strong parent relationship. Such loops are
- simply not tolerated.
- 139 Can't take sizeof function -- There is an attempt to take
- the sizeof a function.
- 140 Type appears after modifier -- Microsoft modifiers such
- as far, _near, __huge, _pascal, etc. etc. modify the
- declarator to its immediate right. It therefore should
- not appear before the type. For example, you should write
- int pascal f(void); rather than pascal int f(void);. Note
- that const and volatile differ from the Microsoft
- modifiers. They may appear before or after the type.
- After reporting the error an attempt is made to process
- the modifiers as the programmer probably intended. See
- also the +fem flag in Section 5.5 Flag Options.
- 141 The following option has too many elements: 'String' --
- The indicated option (given by 'String') is too big. It
- most likely consists of an itemized list that has too many
- items. You should decompose the large option into two or
- more smaller options that in sum are equivalent to the one
- large option.
- 144 Non-existent return value for symbol 'Symbol', compare
- with Location -- An attempt was made to use a
- non-existent return value of the named function
- (identified by Symbol). It was previously decided that
- the function did not return a value or was declared with
- void.
- 145 Type expected before operator, void assumed -- In a
- context in which a type is expected no type is found.
- Rather, an operator '*' or '&' was encountered. The
- keyword void was assumed to have preceded this operator.
- 146 Assuming a binary constant -- A constant of the form
- 0b... was encountered. This was taken to be a binary
- constant. For example, 0b100 represents the value 4. If
- your compiler supports binary constants you may suppress
- this message.
- 147 sizeof takes just one argument -- An expression of the
- form sizeof(a,b) was detected. A second argument is non
- standard and has been used by some compilers to denote an
- option to the sizeof operator. If your compiler has a use
- for the second argument then suppress this message.
- 148 member 'Symbol' previously declared at Location -- The
- indicated member was previously declared within the same
- structure or union. Although a redeclaration of a
- function may appear benign it is just not permitted by the
- rules of the language. One of the declarations should be
- removed.
- 149 C++ construct 'String' found in C code -- An illegal
- construct was found in C code. It looked as though it
- might be suitable for C++. The quoted string identifies
- the construct further.
- 150 Token 'String' unexpected String -- An unexpected token
- was encountered. The action taken, if any, is identified
- by the second message parameter.
- 151 Token 'Name' inconsistent with abstract type -- In a
- context in which an abstract type is allowed such as
- within a cast or after a sizeof, and after starting to
- parse the abstract type, an identifier was found. For
- example:
- x = (int y) z;
- 152 Lob base file 'file name' missing -- The indicated file
- has been specified as the base of lob production via the
- option -lobbase(). On output, this message is given if
- the lob base is missing. The situation is correctable by
- simply producing the missing lob output. This will not be
- a problem given the appropriate dependencies in the make
- file. On input, the most likely cause of this message is
- an out-of-date base file. A hash code within the lob file
- being read, did not match a similar code already embedded
- within the base. The input lob file should be considered
- in error and should be regenerated. See Chapter 7.
- 153 Could not create temporary file -- This message is
- produced when generating a lob output file based upon some
- lob base file. When the lob file is produced, it is first
- written to a temporary. The temporary is generated by the
- C library function tmpnam().
- 154 Could not evaluate type 'String', int assumed -- String
- in the message is the second argument to either a
- printf_code option or a scanf_code option. When used, it
- was to be evaluated as a type. Unfortunately the type
- could not be identified.
- 155 Ignoring {...} sequence within an expression, 0 assumed -- A
- braced sequence within an expression is a non-standard
- extension of some compilers (in particular GCC).
- Internally, we treat such a braced sequence as the
- equivalent of a constant 0. This means that we may be
- able to quietly lint such constructions if you merely
- suppress the message.
- 17.2 Internal Errors
- 200-299 Some inconsistency or contradiction was discovered in
- the PC-lint/FlexeLint system. This may or may not be the
- result of a user error. This inconsistency should be
- brought to the attention of Gimpel Software.
- 17.3 Fatal Errors
- Errors in this category are normally fatal and suppressing the
- error is normally impossible. However, those errors marked with
- an asterisk(*) can be suppressed and processing will be
- continued. For example -e306 will allow reprocessing of modules.
- 301 Stack overflow -- There was a stack overflow while
- processing declarations. Approximately 50 nested
- declarators were found. For example, if a '/' followed by
- 50 consecutive '*'s were to introduce a box-like comment
- and if the '/' were omitted, then this message would be
- produced.
- 302 Exceeded Available Memory -- Main memory has been
- exhausted.
- 303 String too long (try +macros) -- A single #define
- definition or macro invocation exceeded an internal limit
- (of 4096 characters). As the diagnostic indicates the
- problem can be corrected with an option.
- 304 Corrupt object file, code Integer, symbol=String -- A
- PC-lint/FlexeLint object file is apparently corrupted.
- Please delete the object module and recreate it using the
- -oo option. See Section 7. The special code identifier
- number as well as a list of symbol names are optionally
- suffixed to the message as an aid in diagnosing the
- problem by technical support.
- 305 Unable to open module 'file name' -- file name is the
- name of the file. The named module could not be opened
- for reading. Perhaps you misspelled the name.
- 306* Previously encountered module 'FileName' -- FileName is
- the name of the module. The named module was previously
- encountered. This is probably a user blunder.
- 307 Can't open indirect file 'FileName' -- FileName is the
- name of the indirect file. The named indirect file
- (ending in .lnt) could not be opened for reading.
- 308 Can't write to standard out -- stdout was found to equal
- NULL. This is most unusual.
- 309* #error ... -- The #error directive was encountered. The
- ellipsis reflects the original line. Normally processing
- is terminated at this point. If you set the fce (continue
- on #error) flag, processing will continue.
- 310 Declaration too long: 'String...' -- A single declaration
- was found to be too long for an internal buffer (about
- 2000 characters). This occurred when attempting to write
- out the declaration using the -o... option. The first 30
- characters of the declaration is given in String.
- Typically this is caused by a very long struct whose
- substructures, if any, are untagged. First identify the
- declaration that is causing the difficulty. If a struct
- or union, assign a tag to any unnamed substructures or
- subunion. A typedef can also be used to reduce the size
- of such a declaration.
- 312 Lint Object Module has obsolete or foreign version id --
- A lint object module was produced with a prior or
- different version of PC-lint/FlexeLint. Delete the.lob
- file and recreate it using your new version of
- PC-lint/FlexeLint.
- 313 Too many files -- The number of files that
- PC-lint/FlexeLint can process has exceeded an internal
- limit. The FlexeLint user may recompile his system to
- increase this limit. Look for symbol FSETLEN in custom.h.
- Currently, the number of files is limited to 6400.
- 314* Previously used .lnt file: FileName -- The indirect file
- named was previously encountered. If this was not an
- accident, you may suppress this message.
- 315 Exceeded message limit (see -limit) -- The maximum number
- of messages was exceeded. Normally there is no limit
- unless one is imposed by the -limit(n) option. ( See
- Section 5.)
- 316 Error while writing to file "file name" -- The given file
- could not be opened for output.
- 321 Declaration stack overflow -- An overflow occurred in the
- stack used to contain array, pointer, function or
- reference modifiers when processing a declarator.
- 322* Unable to open include file FileName -- FileName is the
- name of the include file, which could not be opened.
- Directory search is controlled by options: -i (See
- Section 5.), +fdi (Section 5.5 Flag Options) and the
- INCLUDE environment variable. This is a suppressible
- fatal message. If option -e322 is used, Error message 7
- will kick in. A diagnostic will be issued but processing
- will continue.
- 323 Token String too long -- In attempting to save a token
- for later reuse, a fixed size buffer was exceeded
- (governed by the size M_TOKEN).
- 324 Too many symbols Integer -- Too many symbols were
- encountered. An internal limit was reached.
- 325 Cannot re-open file 'file name' -- In the case of a large
- number of nested includes, files in the outer fringe need
- to be closed before new ones are opened. These outer
- files then need to be re-opened. An error occurred when
- attempting to re-open such a file.
- 17.4 C Warning Messages
- 401 symbol 'Symbol' not previously declared static at Location
- -- The indicated Symbol declared static was previously
- declared without the static storage class. This is
- technically a violation of the ANSI standard. Some
- compilers will accept this situation without complaint and
- regard the Symbol as static.
- 402 static function 'Symbol' (Location) not defined -- The
- named Symbol was declared as a static function in the
- current module and was referenced but was not defined (in
- the module).
- 403 static symbol 'Symbol' has unusual type modifier -- Some
- type modifiers such as _export are inconsistent with the
- static storage class.
- 404 struct not completed within file 'FileName' -- A struct
- (or union or enum) definition was started within a header
- file but was not completed within the same header file.
- 405 #if not closed off within file 'FileName' -- An #if
- construct was begun within a header file (name given) but
- was not completed within that header file. Was this
- intentional?
- 406 Comment not closed off within file 'FileName' -- A
- comment was begun within a header file (name given) but
- was not completed within that header file. Was this
- intentional?
- 407 Inconsistent use of tag 'Symbol' conflicts with Location
- -- A tag specified as a union, struct or enum was
- respecified as being one of the other two in the same
- module. For example:
- struct tag *p;
- union tag *q;
- will elicit this message.
- 408 Type mismatch with switch expression -- The expression
- within a case does not agree exactly with the type within
- the switch expression. For example, an enumerated type is
- matched against an int.
- 409 Expecting a pointer or array -- An expression of the form
- i[...] was encountered where i is an integral expression.
- This could be legitimate depending on the subscript
- operand. For example, if i is an int and a is an array
- then i[a] is legitimate but unusual. If this is your
- coding style, suppress this message.
- 410 size_t not what was expected from fzl and/or fzu, using
- 'Type' -- This warning is issued if you had previously
- attempted to set the type of sizeof by use of the options
- +fzl, -fzl, or -fzu, and a later size_t declaration
- contradicts the setting. This usually means you are
- attempting to lint programs for another system using
- header files for your own system. If this is the case we
- suggest you create a directory housing header files for
- that foreign system, alter size_t within that directory,
- and lint using that directory.
- 411 ptrdiff_t not what was expected from fdl option, using
- 'Type' -- This warning is issued if you had previously
- attempted to set the type of pointer differences by use of
- the fdl option and a later ptrdiff_t declaration
- contradicts the setting. See suggestion in Error Message
- 410.
- 412 Ambiguous format specifier '%X' -- The format specifier
- %X when used with one of the scanf family, is ambiguous.
- With Microsoft C it means %lx whereas in ANSI C it has the
- meaning of %x. This ambiguous format specification has no
- place in any serious C program and should be replaced by
- one of the above.
- 413 Likely use of null pointer 'Symbol' in [left/right]
- argument to operator 'String' Reference -- From
- information gleaned from earlier statements, it appears
- certain that a null pointer (a pointer whose value is 0)
- has been used in a context where null pointers are
- inappropriate. These include: Unary *, pointer increment
- (++) or decrement(--), addition of pointer to numeric, and
- subtraction of two pointers. In the case of binary
- operators, one of the words 'left' or 'right' is used to
- designate which operand is null. Symbol identifies the
- pointer variable that may be null. See also messages 613
- and 794, and Section 9.2 Value Tracking.
- 414 Possible division by 0 -- The second argument to either
- the division operator (/) or the modulus operator (%) may
- be zero. Information is taken from earlier statements
- including assignments, initialization and tests. See
- Section 9.
- 415 access of out-of-bounds pointer ('Integer' beyond end of
- data) by operator 'String' -- An out-of-bounds pointer
- was accessed. String designates the operator. The
- parameter 'Integer' gives some idea how far out of bounds
- the pointer may be. It is measured in units given by the
- size of the pointed to object. The value is relative to
- the last item of good data and therefore should always be
- greater than zero. For example:
- int a[10];
- a[10] = 0;
- results in an overflow message containing the phrase '1
- beyond end of data'. See Section 9.
- 416 creation of out-of-bounds pointer ('Integer' beyond end of
- data) by operator 'String' -- An out-of-bounds pointer
- was created. See message 415 for a description of the
- parameters Integer and String. For example:
- int a[10];
- ...
- f( a + 11 );
- Here, an illicit pointer value is created and is flagged
- as such by PC-lint/FlexeLint. Note that the pointer a+10
- is not considered by PC-lint/FlexeLint to be the creation
- of an out-of-bounds pointer. This is because ANSI C
- explicitly allows pointing just beyond an array. Access
- through a+10, however, as in *(a+10) or the more familiar
- a[10], would be considered erroneous but in that case
- message 415 would be issued. See Section 9.
- 417 integral constant 'String' longer than long long int --
- The longest possible integer is by default 8 bytes (see
- the +fll flag and then the -sll# option). An integral
- constant was found to be even larger than such a quantity.
- For example: 0xFFFF0000FFFF0000F. String is the token in
- error.
- 418 Passing null pointer to function 'Symbol', Context
- Reference -- A NULL pointer is being passed to a function
- identified by Symbol. The argument in question is given
- by Context. The function is either a library function
- designed not to receive a NULL pointer or a user function
- dubbed so via the option -function. See Section 10.1
- Function Mimicry (function) and Section 10.2.1 Possible
- Semantics.
- 419 Apparent data overrun for function 'Symbol', argument
- Integer exceeds argument Integer -- This message is for
- data transfer functions such as memcpy, strcpy, fgets,
- etc. when the size indicated by the first cited argument
- (or arguments) exceeds the size of the buffer area cited
- by the second. The message may also be issued for user
- functions via the -function option. See Section 10.1
- Function Mimicry (function) and Section 10.2.1 Possible
- Semantics.
- 420 Apparent access beyond array for function 'Symbol',
- argument Integer exceeds Integer Reference -- This
- message is issued for several library functions (such as
- fwrite, memcmp, etc.) wherein there is an apparent attempt
- to access more data than exist. For example, if the
- length of data specified in the fwrite call exceeds the
- size of the data specified. The function is specified by
- Symbol and the arguments are identified by argument
- number. See also Section 10.1 Function Mimicry (function)
- and Section 10.2.1 Possible Semantics.
- 421 Caution -- function 'Symbol' is considered dangerous --
- This message is issued (by default) for the built-in
- function gets. This function is considered dangerous
- because there is no mechanism to ensure that the buffer
- provided as first argument will not overflow. A well
- known computer virus (technically a worm) was created
- based on this defect. Through the -function option, the
- user may designate other functions as dangerous.
- 422 Passing to function 'Symbol' a negative value (Integer),
- Context Reference -- An integral value that appears to be
- negative is being passed to a function that is expecting
- only positive values for a particular argument. The
- message contains the name of the function (Symbol), the
- questionable value (Integer) and the argument number
- (Context). The function may be a standard library
- function designed to accept only positive values such as
- malloc or memcpy (third argument), or may have been
- identified by the user as such through the -function or
- -sem options.
- The negative integral value may in fact be unsigned.
- Thus:
- void *malloc( unsigned );
- void f()
- {
- int n = -1;
- int *p;
- p = malloc(n); // Warning 422
- p = malloc( (unsigned) n ); // Warning 422
- }
- will result in the warnings indicated. Note that casting
- the expression does not inhibit the warning.
- There is a slight difference in behavior on 32-bit systems
- versus 16-bit systems. If long is the same size as int
- (as in 32-bit systems) the warning is issued based upon
- the sign bit. If long is larger than an int (as is true
- on typical 16-bit systems) the warning is issued if the
- value was a converted negative as in the examples above.
- It is not issued if an unsigned int has the high-order bit
- set. This is because it is not unreasonable to malloc
- more that 32,176 bytes in a 16-bit system.
- 423 Creation of memory leak in assignment to variable 'Symbol'
- -- An assignment was made to a pointer variable
- (designated by Symbol), which appeared to already be
- holding the address of an allocated object, which had not
- been freed. The allocation of memory, which is not freed,
- is considered a memory leak.
- 424 Inappropriate deallocation (Name1) for 'Name2' data. --
- This message indicates that a deallocation (free(),
- delete, or delete[]) as specified by Name1 is
- inappropriate for the data being freed. [12, Item 5]
- The kind of data (specified by Name2) is one or more of:
- malloc, new, new[], static, auto, member, modified or
- constant. These have the meanings as described below:
- Malloc data is data obtained from a call
- to malloc, calloc or realloc.
- new and new[] data is data derived from calls to new.
- Static data is either static data within
- a function or external data.
- auto data is non-static data in a function.
- Member data is a component of a structure
- (and hence can't be independently freed).
- modified data is the result of applying pointer
- arithmetic to some other pointer. E.g.
- p = malloc(100);
- free( p+1 ); // warning
- p+1 is considered modified.
- constant data is the result of casting a
- constant to a pointer. E.g.
- int *p = (int *) Ox80002;
- free(p); // warning
- 425 'Message' in processing semantic 'String' at token
- 'String' -- This warning is issued when a syntax error is
- encountered while processing a semantic option (-sem).
- The 'Message' depends upon the error. The first 'String'
- represents the portion of the semantic being processed.
- The second 'String' denotes the token being scanned when
- the error is first noticed.
- 426 Call to function 'Symbol' violates semantic 'String' --
- This Warning message is issued when a user semantic (as
- defined by -sem) is violated. 'String' is the subportion
- of the semantic that was violated. For example:
- //lint -sem( f, 1n > 10 && 2n > 10 )
- void f( int, int );
- ...
- f( 2, 20 );
- results in the message:
- Call to function 'f(int, int)' violates semantic '(1n>10)'
- 427 // comment terminates in -- A one-line comment
- terminates in the back-slash escape sequence. This means
- that the next line will be absorbed in the comment (by a
- standards-conforming compiler -- not all compilers do the
- absorption, so beware). It is much safer to end the line
- with something other than a back-slash. Simply tacking on
- a period will do. If you really intend the next line to
- be a comment, the line should be started with its own
- double slash (//).
- 428 negative subscript (Integer) in operator 'String' -- A
- negative integer was added to an array or to a pointer to
- an allocated area (allocated by malloc, operator new,
- etc.) This message is not given for pointers whose origin
- is unknown since a negative subscript is, in general,
- legal.
- The addition could have occurred as part of a subscript
- operation or as part of a pointer arithmetic operation.
- The operator is denoted by String. The value of the
- integer is given by Integer.
- 429 Custodial pointer 'Symbol' (Location) has not been freed
- or returned -- A pointer of auto storage class was
- allocated storage, which was neither freed nor returned to
- the caller. This represents a "memory leak". A pointer
- is considered custodial if it uniquely points to the
- storage area. It is not considered custodial if it has
- been copied. Thus:
- int *p = new int[20]; // p is a custodial pointer
- int *q = p; // p is no longer custodial
- p = new int[20]; // p again becomes custodial
- q = p + 0; // p remains custodial
- Here p does not lose its custodial property by merely
- participating in an arithmetic operation.
- A pointer can lose its custodial property by passing the
- pointer to a function. If the parameter of the function
- is typed pointer to const or if the function is a library
- function, that assumption is not made. For example
- p = malloc(10);
- strcpy (p, "hello");
- Then p still has custody of storage allocated.
- It is possible to indicate via semantic options that a
- function will take custody of a pointer. See custodial(i)
- in Section 10.2.1 Possible Semantics.
- 430 Character '@', taken to specify variable location, is not
- standard C/C++ -- Many compilers for embedded systems
- have a declaration syntax that specifies a location in
- place of an initial value for a variable. For example:
- int x @0x2000;
- specifies that variable x is actually location 0x2000.
- This message is a reminder that this syntax is
- non-standard (although quite common). If you are using
- this syntax on purpose, suppress this message.
- 432 Suspicious argument to malloc -- The following pattern
- was detected:
- malloc( strlen(e+1) )
- where e is some expression. This is suspicious because it
- closely resembles the commonly used pattern:
- malloc( strlen(e)+1 )
- If you really intended to use the first pattern then an
- equivalent expression that will not raise this error is:
- malloc( strlen(e)-1 )
- 433 Allocated area not large enough for pointer -- An
- allocation was assigned to a pointer whose reach extends
- beyond the area that was allocated. This would usually
- happen only with library allocation routines such as
- malloc and calloc. For example:
- int *p = malloc(1);
- This message is also provided for user-declared allocation
- functions. For example, if a user's own allocation
- function is provided with the following semantic:
- -sem(ouralloc,@P==malloc(1n))
- We would report the same message. Please note that it is
- necessary to designate that the returned area is freshly
- allocated (ala malloc).
- This message is always given in conjunction with the more
- general Informational Message 826.
- 434 White space ignored between back-slash and new-line --
- According to the C and C++ standards, any back-slash
- followed immediately by a new-line results in the deletion
- of both characters. For example:
- #define A
- 34
- defines A to be 34. If a blank or tab intervenes between
- the back-slash and the new-line then according to a strict
- interpretation of the standard you have defined A to be a
- back-slash. But this blank is invisible to the naked eye
- and hence could lead to confusion. Worse, some compilers
- silently ignore the white-space and the program becomes
- non-portable.
- You should never deliberately place a blank at the end of
- a line and any such blanks should be removed. If you
- really need to define a macro with a terminal back-slash
- you can use a comment as in:
- #define A /* commentary */
- 435 integral constant 'String' has precision Integer, use +fll
- to enable long long" -- An integer constant was found
- that had a precision that was too large for a long but
- would fit within a long long. Yet the +fll flag that
- enables the long long type was not set.
- Check the sizes that you specified for long (-sl#) and for
- long long (-sll#) and make sure they are correct. Turn on
- +fll if your compiler supports long long. Otherwise use
- smaller constants.
- 436 Preprocessor directive in invocation of macro 'Symbol' at
- Location -- A function like macro was invoked whose
- arguments extended for multiple lines, which included
- preprocessor statements. This is almost certainly an
- error brought about by a missing right parenthesis.
- By the rules of Standard C the preprocessing directive is
- absorbed into the macro argument but then will not
- subsequently get executed. For this reason some compilers
- treat the apparent preprocessor directive as a directive.
- This is logical but not portable. It is therefore best to
- avoid this construct.
- 437 Passing struct 'Symbol' to ellipsis -- A struct is being
- passed to a function at a parameter position identified by
- an ellipsis. For example:
- void g()
- {
- struct A { int a; } x;
- void f( int, ... );
- f( 1, x );
- ...
- }
- This is sufficiently unusual that it is worth pointing out
- on the likelihood that this is unintended. The situation
- becomes more severe in the case of a Non-POD struct [10].
- In this case the behavior is considered undefined.
- 501 Expected signed type -- The unary minus operator was
- applied to an unsigned type. The resulting value is a
- positive unsigned quantity and may not be what was
- intended.
- 502 Expected unsigned type -- Unary ~ being a bit operator
- would more logically be applied to unsigned quantities
- rather than signed quantities.
- 503 Boolean argument to relational -- Normally a relational
- would not have a Boolean as argument. An example of this
- is a < b < c, which is technically legal but does not
- produce the same result as the mathematical expression,
- which it resembles.
- 504 Unusual shift value -- Either the quantity being shifted
- or the amount by which a quantity is to be shifted was
- derived in an unusual way such as with a bit-wise logical
- operator, a negation, or with an unparenthesized
- expression. If the shift value is a compound expression
- that is not parenthesized, parenthesize it.
- 505 Redundant left argument to comma -- The left argument to
- the comma operator had no side effects in its top-most
- operator and hence is redundant.
- 506 Constant value Boolean -- A Boolean, i.e., a quantity
- found in a context that requires a Boolean such as an
- argument to && or || or an if() or while() clause or ! was
- found to be a constant and hence will evaluate the same
- way each time.
- 507 Size incompatibility -- A cast was made to an integral
- quantity from a pointer and according to other information
- given or implied it would not fit. For example a cast to
- an unsigned int was specified and information provided by
- the options indicate that a pointer is are larger than an
- int.
- 508 extern used with definition -- A function definition was
- accompanied with an extern storage class. extern is
- normally used with declarations rather than with
- definitions. At best the extern is redundant. At worst
- you may trip up a compiler.
- 509 extern used with definition -- A data object was defined
- with a storage class of extern. This is technically legal
- in ANSI and you may want to suppress this message.
- However, it can easily trip up a compiler and so the
- practice is not recommended at this time.
- 511 Size incompatibility -- A cast was made from an integral
- type to a pointer and the size of the quantity was too
- large to fit into the pointer. For example if a long is
- cast to a pointer and if options indicate that a long is
- larger than a pointer, this warning would be reported.
- 512 Symbol 'Symbol' previously used as static (Location) --
- The Symbol name given is a function name that was declared
- as static in some other module (the location of that
- declaration is provided). The use of a name as static in
- one module and external in another module is legal but
- suspect.
- 514 Unusual use of a Boolean -- An argument to an arithmetic
- operator (+ - / * %) or a bit-wise logical operator (| &
- ^) was a Boolean. This can often happen by accident as
- in:
- if( flags & 4 == 0 )
- where the ==, having higher precedence than &, is done
- first (to the puzzlement of the programmer).
- 515 Symbol 'Symbol' has arg. count conflict (Integer vs.
- Integer) with Location -- An inconsistency was found in
- the number of actual arguments provided in a function call
- and either the number of formal parameters in its
- definition or the number of actual arguments in some other
- function call. See the +fva option to selectively
- suppress this message.
- 516 Symbol 'Symbol' has arg. type conflict (no. Integer --
- TypeDiff) with Location -- An inconsistency was found in
- the type of an actual argument in a function call with
- either the type of the corresponding formal parameter in
- the function definition or the type of an actual argument
- in another call to the same function or with the type
- specified for the argument in the function's prototype.
- The call is not made in the presence of a prototype. See
- options -ean, -eau, -eas and -eai Section 5.2 Error
- Inhibition Options for selective suppression of some kinds
- of type differences. If the conflict involves types char
- or short then you may want to consider using the +fxc or
- +fxs option. (Section 5.5 Flag Options) See also Section
- 15.4 Warning 516.
- 517 defined not K&R -- The defined function (not a K&R
- construct) was employed and the K&R preprocessor flag
- (+fkp) was set. Either do not set the flag or do not use
- defined.
- 518 Expected '(' -- sizeof type is not strict C.
- sizeof(type) or sizeof expression are both permissible.
- 519 Size incompatibility -- An attempt was made to cast a
- pointer to a pointer of unequal size. This could occur
- for example in a P model where pointers to functions
- require 4 bytes whereas pointers to data require only 2.
- This error message can be circumvented by first casting
- the pointer to an integral quantity (int or long) before
- casting to a pointer.
- 520 Expected void type, assignment, increment or decrement.
- -- The first expression of a for clause should either be
- an expression yielding the void type or be one of the
- privileged operators: assignment, increment, or decrement.
- See also message 522.
- 521 Expected void type, assignment, increment or decrement.
- -- The third expression of a for clause should either be
- an expression yielding the void type or be one of the
- privileged operators: assignment, increment, or decrement.
- See also message 522.
- 522 Expected void type, assignment, increment or decrement.
- -- If a statement consists only of an expression, it
- should either be an expression yielding the void type or
- be one of the privileged operators: assignment, increment,
- or decrement. Note that the statement *p++; draws this
- message but p++; does not. This message is frequently
- given in cases where a function is called through a
- pointer and the return value is not void. In this case we
- recommend a cast to void. If your compiler does not
- support the void type then you should use the -fvo option.
- 524 Loss of precision (Context) (Type to Type) -- There is a
- possible loss of a fraction in converting from a float to
- an integral quantity. Use of a cast will suppress this
- message.
- 525 Negative indentation from Location -- The current line
- was found to be negatively indented (i.e., not indented as
- much) from the indicated line. The latter corresponds to
- a clause introducing a control structure and statements
- and other control clauses and braces within its scope are
- expected to have no less indentation. If tabs within your
- program are other than 8 blanks you should use the -t
- option (See Section 11.).
- 526 Symbol 'Symbol' (Location) not defined -- The named
- external was referenced but not defined and did not appear
- declared in any library header file nor did it appear in a
- Library Module. This message is suppressed for unit
- checkout (-u option). Please note that a declaration,
- even one bearing prototype information is not a
- definition. See the glossary at the beginning of this
- chapter. If the Symbol is a library symbol, make sure
- that it is declared in a header file that you're
- including. Also make sure that the header file is
- regarded by PC-lint/FlexeLint as a Library Header file.
- Alternatively, the symbol may be declared in a Library
- Module. See Section 6.1 Library Header Files and Section
- 6.2 Library Modules for a further discussion.
- 527 Unreachable -- A portion of the program cannot be reached.
- 528 Symbol 'Symbol' (Location) not referenced -- The named
- static variable or static function was not referenced in
- the module after having been declared.
- 529 Symbol 'Symbol' (Location) not subsequently referenced --
- The named variable was declared but not referenced in a
- function.
- 530 Symbol 'Symbol' (Location) not initialized -- An auto
- variable was used before it was initialized.
- 531 Field size too large for 'Symbol' -- The size given for a
- bit field of a structure exceeds the size of an int.
- 532 Return mode of function 'Symbol' inconsistent with
- Location -- A declaration (or a definition) of a function
- implies a different return mode than a previous statement.
- (The return mode of a function has to do with whether the
- function does, or does not, return a value). A return
- mode is determined from a declaration by seeing if the
- function returns void or, optionally, by observing whether
- an explicit type is given. See the fdr flag for a further
- explanation of this. See also the fvr and fvo flags in
- Section 5.5 Flag Options.
- 533 function 'Symbol' should (not) return a value (see
- Location) -- A return statement within a function (or
- lack of a return at the end of the function) implies a
- different return mode than a previous statement at
- Location (The return mode of a function has to do with
- whether the function does, or does not, return a value.)
- See also the fvr, fvo and fdr flags in Section 5.5 Flag
- Options.
- 534 Ignoring return value of function 'Symbol' (compare with
- Location) -- A function that returns a value is called
- just for side effects as, for example, in a statement by
- itself or the left-hand side of a comma operator. Try:
- (void) function(); to call a function and ignore its
- return value. See also the fvr, fvo and fdr flags in
- Section 5.5 Flag Options.
- 537 Repeated include file 'FileName' -- The file whose
- inclusion within a module is being requested has already
- been included in this compilation. The file is processed
- normally even if the message is given. If it is your
- standard practice to repeat included files then simply
- suppress this message.
- 538 Excessive size -- The size of an array equals or exceeds
- 64K bytes.
- 539 Did not expect positive indentation from Location -- The
- current line was found to be positively indented from a
- clause that did not control the line in question. For
- example:
- if( n > 0 )
- x = 3;
- y = 4;
- will result in this warning being issued for y = 4;. The
- Location cited will be that of the if clause. See Section 11.
- 540 Excessive size -- A string initializer required more
- space than what was allocated.
- 541 Excessive size -- The size of a character constant
- specified with xddd or xhhh equaled or exceeded 2**b
- where b is the number of bits in a byte (established by
- the -sb option). The default is -sb8.
- 542 Excessive size for bit field -- An attempt was made to
- assign a value into a bit field that appears to be too
- small. The value to be assigned is either another bit
- field larger than the target, or a numeric value that is
- simply too large. You may cast the value to the generic
- unsigned type to suppress the error.
- You may get this message unexpectedly if the base of the
- bit field is an int. For example:
- struct { int b : 1 } s;
- s.b = 1; /* Warning - - requires 0 or -1 */
- The solution in this case is to use 'unsigned' rather than
- 'int' in the declaration of b.
- 544 endif or else not followed by EOL -- The preprocessor
- directive #endif should be followed by an end-of-line.
- Some compilers specifically allow commentary to follow the
- #endif. If you are following that convention simply turn
- this error message off.
- 545 Suspicious use of & -- An attempt was made to take the
- address of an array name. At one time such an expression
- was officially illegal (K&R C [1]), was not consistently
- implemented, and was, therefore, suspect. However, the
- expression is legal in ANSI C and designates a pointer to
- an array. For example, given
- int a[10];
- int (*p) [10];
- Then a and &a, as pointers, both represent the same bit
- pattern, but whereas a is a pointer to int, &a is a
- pointer to array 10 of int. Of the two only &a may be
- assigned to p without complaint. If you are using the &
- operator in this way, we recommend that you disable this
- message.
- 546 Suspicious use of & -- An attempt was made to take the
- address of a function name. Since names of functions by
- themselves are promoted to address, the use of the & is
- redundant and could be erroneous.
- 547 Redefinition of symbol 'Symbol' conflicts with Location
- -- The indicated symbol had previously been defined (via
- #define) to some other value.
- 548 else expected -- A construct of the form if(e); was
- found, which was not followed by an else. This is almost
- certainly an unwanted semi-colon as it inhibits the if
- from having any effect.
- 549 Suspicious cast -- A cast was made from a pointer to some
- enumerated type or from an enumerated type to a pointer.
- This is probably an error. Check your code and if this is
- not an error, then cast the item to an intermediate form
- (such as an int or a long) before making the final cast.
- 550 Symbol 'Symbol' (Location) not accessed -- A variable
- (local to some function) was not accessed. This means
- that the value of a variable was never used. Perhaps the
- variable was assigned a value but was never used. Note
- that a variable's value is not considered accessed by
- autoincrementing or autodecrementing unless the
- autoincrement/decrement appears within a larger
- expression, which uses the resulting value. The same
- applies to a construct of the form: var += expression. If
- an address of a variable is taken, its value is assumed to
- be accessed. An array, struct or union is considered
- accessed if any portion thereof is accessed.
- 551 Symbol 'Symbol' (Location) not accessed -- A variable
- (declared static at the module level) was not accessed
- though the variable was referenced. See the explanation
- under message 550 (above) for a description of "access".
- 552 Symbol 'Symbol' (Location) not accessed -- An external
- variable was not accessed though the variable was
- referenced. See the explanation under message 550 above
- for a description of "access".
- 553 Undefined preprocessor variable 'Name', assumed 0 -- The
- indicated variable had not previously been defined within
- a #define statement and yet it is being used in a
- preprocessor condition of the form #if or #elif.
- Conventionally all variables in preprocessor expressions
- should be pre-defined. The value of the variable is
- assumed to be 0.
- 555 #elif not K&R -- The #elif directive was used and the K&R
- preprocessor flag (+fkp) was set. Either do not set the
- flag or do not use #elif.
- 556 indented # -- A preprocessor directive appeared indented
- within a line and the K&R preprocessor flag (+fkp) was
- set. Either do not set the flag or do not indent the #.
- 557 unrecognized format -- The format string supplied to
- printf, fprintf, sprintf, scanf, fscanf, or sscanf was not
- recognized. It is neither a standard format nor is it a
- user-defined format (see printf_code and scanf_code,
- Section 5.7 Other Options).
- 558 number of arguments inconsistent with format -- The
- number of arguments supplied to printf, sprintf, fprintf,
- scanf, fscanf or sscanf was inconsistent with the number
- expected as a result of analyzing the format string.
- 559 size of argument number Integer inconsistent with format
- -- The given argument (to printf, sprintf, or fprintf) was
- inconsistent with that which was anticipated as the result
- of analyzing the format string. Argument counts begin at
- 1 and include file, string and format specifications. For
- example,
- sprintf( buffer, "%f", 371 )
- will show an error in argument number 3 because constant
- 371 is not floating point.
- 560 argument no. Integer should be a pointer -- The given
- argument (to one of the scanf or printf family of
- functions) should be a pointer. For the scanf family, all
- arguments corresponding to a format specification should
- be pointers to areas that are to be modified (receive the
- results of scanning). For the printf family, arguments
- corresponding to %s or %n also need to be pointers.
- Argument counts begin at 1 and include file, string and
- format specifications. For example
- scanf( "%f", 3.5 )
- will generate the message that argument no. 2 should be a
- pointer.
- 561 (arg. no. Integer) indirect object inconsistent with
- format -- The given argument (to scanf, sscanf, or
- fscanf) was a pointer to an object that was inconsistent
- with that which was anticipated as the result of analyzing
- the format string. Argument counts begin at 1 and include
- file, string and format specifications. For example if n
- is declared as int then:
- scanf( "%c", &n )
- will elicit this message for argument number 2.
- 562 Ellipsis (...) assumed -- Within a function prototype a
- comma was immediately followed by a right parenthesis.
- This is taken by some compilers to be equivalent to an
- ellipsis (three dots) and this is what is assumed by
- PC-lint/FlexeLint. If your compiler does not accept the
- ellipsis but makes this assumption, then you should
- suppress this message.
- 563 Label 'Symbol' (Location) not referenced -- The Symbol at
- the cited Location appeared as a label but there was no
- statement that referenced this label.
- 564 variable 'Symbol' depends on order of evaluation -- The
- named variable was both modified and accessed in the same
- expression in such a way that the result depends on
- whether the order of evaluation is left-to-right or
- right-to-left. One such example is: n + n++ since there
- is no guarantee that the first access to n occurs before
- the increment of n. Other, more typical cases, are given
- in Section 11.1 Order of Evaluation and Section 11.5
- volatile Checking. Volatile variables are also checked
- for repeated use in an expression. See
- 565 tag 'Symbol' not previously seen, assumed file-level scope
- -- The named tag appeared in a prototype or in an inner
- block and was not previously seen in an outer (file-level)
- scope. The ANSI standard is dubious as to how this tag
- could link up with any other tag. For most compilers this
- is not an error and you can safely suppress the message.
- On the other hand, to be strictly in accord with ANSI C
- you may place a small stub of a declaration earlier in the
- program. For example:
- struct name;
- is sufficient to reserve a place for name in the symbol
- table at the appropriate level.
- 566 Inconsistent or redundant format char 'Char' -- This
- message is given for format specifiers within formats for
- the printf/scanf family of functions. The indicated
- character Char found in a format specifier was
- inconsistent or redundant with an earlier character found
- in the same format specifier. For example a format
- containing "%ls" will yield this error with the character
- 's' indicated. This is because the length modifier is
- designed to be used with integral or float conversions and
- has no meaning with the string conversion. Such
- characters are normally ignored by compilers.
- 567 Expected a numeric field before char 'Char' -- This
- message is given for format specifiers within formats for
- the printf/scanf family of functions. A numeric field or
- asterisk was expected at a particular point in the
- scanning of the format. For example: %-d requests left
- justification of a decimal integer within a format field.
- But since no field width is given, the request is meaning
- less.
- 568 nonnegative quantity is never less than zero. --
- Comparisons of the form:
- u >= 0 0 <= u
- u < 0 0 > u
- are suspicious if u is an unsigned quantity or a quantity
- judged to be never less then 0. See also message 775.
- 569 Loss of information (Context) (Integer bits to Integer
- bits) -- An assignment (or implied assignment, see
- Context) was made from a constant to an integral variable
- that is not large enough to hold the constant. Examples
- include placing a hex constant whose bit requirement is
- such as to require an unsigned int into a variable typed
- as int. The number of bits given does not count the sign
- bit.
- 570 Loss of sign (Context) (Type to Type) -- An assignment
- (or implied assignment, see Context) is being made from a
- negative constant into an unsigned quantity. Casting the
- constant to unsigned will remove the diagnostic but is
- this what you want. If you are assigning all ones to an
- unsigned, remember that ~0 represents all ones and is more
- portable than -1.
- 571 Suspicious Cast -- Usually this warning is issued for
- casts of the form:
- (unsigned) ch
- where ch is declared as char and char is signed. Although
- the cast may appear to prevent sign extension of ch, it
- does not. Following the normal promotion rules of C, ch
- is first converted to int, which extends the sign and only
- then is the quantity cast to unsigned. To suppress sign
- extension you may use:
- (unsigned char) ch
- Otherwise, if sign extension is what you want and you just
- want to suppress the warning in this instance you may use:
- (unsigned) (int) ch
- Although these examples have been given in terms of
- casting a char they will also be given whenever this cast
- is made upon a signed quantity whose size is less than the
- casted type. Examples include signed bit fields (a
- possibility in the new standard), expressions involving
- char, and expressions involving short when this type is
- smaller than int or a direct cast of an int to an unsigned
- long (if int's is smaller than long). This message is not
- issued for constants or for expressions involving bit
- operations.
- 572 Excessive shift value (precision Integer shifted right by
- Integer) -- A quantity is being shifted to the right
- whose precision is equal to or smaller than the shifted
- value. For example,
- ch >> 10
- will elicit this message if ch is typed char and where
- char is less than 10 bits wide (the usual case). To
- suppress the message in this case you may cast the shifted
- quantity to a type whose length is at least the length of
- the shift value.
- The precision of a constant (including enumeration
- constants) is determined from the number of bits required
- in its binary representation. The precision does not
- change with a cast so that still yields (unsigned) 1 >> 3
- the message. But normally the only way an expression such
- as 1>>3 can legitimately occur is via a macro. In this
- case use -emacro.
- 573 Signed-unsigned mix with divide -- one of the operands to
- / or % was signed and the other unsigned; moreover the
- signed quantity could be negative. For example:
- u / n
- where u is unsigned and n is signed will elicit this
- message whereas:
- u / 4
- will not, even though 4 is nominally an int. It is not a
- good idea to mix unsigned quantities with signed
- quantities in any case (a 737 will also be issued) but,
- with division, a negative value can create havoc. For
- example, the innocent looking:
- n = n / u
- will, if n is -2 and u is 2, not assign -1 to n but will
- assign some very large value.
- To resolve this problem, either cast the integer to
- unsigned if you know it can never be less than zero or
- cast the unsigned to an integer if you know it can never
- exceed the maximum integer.
- 574 Signed-unsigned mix with relational -- The four
- relational operators are:
- > >= < <=
- One of the operands to a relational operator was signed
- and the other unsigned; also, the signed quantity could be
- negative. For example:
- if( u > n ) ...
- where u is unsigned and n is signed will elicit this
- message whereas:
- if( u > 12 ) ...
- will not (even though 12 is officially an int it is
- obvious that it is not negative). It is not a good idea
- to mix unsigned quantities with signed quantities in any
- case (a 737 will also be issued) but, with the four
- relationals, a negative value can produce obscure results.
- For example, if the conditional:
- if( n < 0 ) ...
- is true then the similar appearing:
- u = 0;
- if( n < u ) ...
- is false because the promotion to unsigned makes n very
- large.
- To resolve this problem, either cast the integer to
- unsigned if you know it can never be less than zero or
- cast the unsigned to an int if you know it can never
- exceed the maximum int.
- 575 enumeration constant exceeds range for integers -- For
- many compilers the value of an enumeration constant is
- limited to those values that can fit within a signed or
- unsigned int.
- 577 Mixed memory model (option 'String') -- The indicated
- option requested a change to the memory model after part
- or all of another module was processed. The memory model
- option should be specified before any module is processed.
- The most common cause of this error is specifying the
- memory model after having specified the standard library.
- This would be a natural error to make if the standard
- library file were specified via a LINT environment
- variable.
- 578 Declaration of symbol 'Symbol' hides symbol 'Symbol'
- (Location) -- A local symbol has the identical name as a
- global symbol ( or possibly another local symbol). This
- could be dangerous. Was this deliberate? It is usually
- best to rename the local symbol.
- 579 parameter preceding ellipsis has invalid type -- When an
- ellipsis is used, the type preceding the ellipsis should
- not be a type that would undergo a default promotion such
- as char, short or float. The reason is that many
- compilers' variable argument schemes (using stdarg.h) will
- break down.
- 580 Redeclaration of function 'Symbol' (hiding Location)
- causes loss of prototype -- A declaration of a function
- within a block hides a declaration in an outer scope in
- such a way that the inner declaration has no prototype and
- the outer declaration does. A common misconception is
- that the resulting declaration is a composite of both
- declarations but this is only the case when the
- declarations are in the same scope not within nested
- scopes. If you don't care about prototypes you may
- suppress this message. You will still receive other
- type-difference warnings.
- 581 Option 'String' is obsolete and should no longer be used
- -- This message is issued whenever we encounter an option
- that appears to do more harm than good. 'String' is the
- option in question.
- 582 esym (or emacro) name 'String' should not contain '(' --
- The name provided to esym should not contain a (. For
- example, to suppress message 534 when calling f(int) use
- the option -esym(534,f) even if f is overloaded.
- 601 Expected a type for symbol Symbol, int assumed -- A
- declaration did not have an explicit type. int was
- assumed. Was this a mistake? This could easily happen if
- an intended comma was replaced by a semicolon. For
- example, if instead of typing:
- double radius,
- diameter;
- the programmer had typed:
- double radius;
- diameter;
- this message would be raised.
- 602 Comment within comment -- The sequence /* was found
- within a comment. Was this deliberate? Or was a comment
- end inadvertently omitted? If you want PC-lint/FlexeLint
- to recognize nested comments you should set the Nested
- Comment flag using the +fnc option. Then this warning
- will not be issued. If it is your practice to use the
- sequence:
- /*
- /* */
- then use -e602.
- 603 Symbol 'Symbol' (Location) not initialized -- The address
- of the named symbol is being passed to a function where
- the corresponding parameter is declared as pointer to
- const. This implies that the function will not modify the
- object. If this is the case then the original object
- should have been initialized sometime earlier.
- 604 Returning address of auto variable 'Symbol' -- The
- address of the named symbol is being passed back by a
- function. Since the object is an auto and since the
- duration of an auto is not guaranteed past the return,
- this is most likely an error. You may want to copy the
- value into a global variable and pass back the address of
- the global or you might consider having the caller pass an
- address of one of its own variables to the callee.
- 605 Increase in pointer capability (Context) -- This warning
- is typically caused by assigning a (pointer to const) to
- an ordinary pointer. For example:
- int *p;
- const int *q;
- p = q; /* 605 */
- The message will be inhibited if a cast is used as in:
- p = (int *) q;
- An increase in capability is indicated because the const
- pointed to by q can now be modified through p. This
- message can be given for the volatile qualifier as well as
- the const qualifier and may be given for arbitrary pointer
- depths (pointers to pointers, pointers to arrays, etc.).
- If the number of pointer levels exceeds one, things get
- murky in a hurry. For example:
- const char ** ppc;
- char ** pp;
- pp = ppc; /* 605 - clearly not safe */
- ppc = pp; /* 605 - looks safe but it's not */
- It was not realized by the C community until very recently
- that assigning pp to ppc was dangerous. The problem is
- that after the above assignment, a pointer to a const char
- can be assigned indirectly through ppc and accessed
- through pp, which can then modify the const char.
- The message speaks of an "increase in capability" in
- assigning to ppc, which seems counter intuitive because
- the indirect pointer has less capability. However,
- assigning the pointer does not destroy the old one and the
- combination of the two pointers represents a net increase
- in capability.
- The message may also be given for function pointer
- assignments when the prototype of one function contains a
- pointer of higher capability than a corresponding pointer
- in another prototype. There is a curious inversion here
- whereby a prototype of lower capability translates into a
- function of greater trust and hence greater capability (a
- Trojan Horse). For example, let
- void warrior( char * );
- be a function that destroys its argument. Consider the
- function:
- void Troy( void (*horse)(const char *) );
- Troy() will call horse() with an argument that it
- considers precious believing the horse() will do no harm.
- Before compilers knew better and believing that adding in
- a const to the destination never hurt anything, earlier
- compilers allowed the Greeks to pass warrior() to Troy and
- the rest, as they say, is history.
- 606 Non-ANSI escape sequence: 'String' -- An escape sequence
- occurred, within a character or string literal, that was
- not on the approved list, which is:
- ' " ? \ a b f n r t v
- octal-digits xhex-digits
- 607 Parameter 'Symbol' of macro found within string -- The
- indicated name appeared within a string or character
- literal within a macro and happens to be the same as the
- name of a formal parameter of the macro as in:
- #define mac(n) printf( "n = %d,", n );
- Is this a coincidence? The ANSI standard indicates that
- the name will not be replaced but since many C compilers
- do replace such names the construction is suspect.
- Examine the macro definition and if you do not want
- substitution, change the name of the parameter. If you do
- want substitution, set the +fps flag (Parameter within
- String) and suppress the message with -e607.
- 608 Assigning to an array parameter -- An assignment is being
- made to a parameter that is typed array. For the purpose
- of the assignment, the parameter is regarded as a pointer.
- Normally such parameters are typed as pointers rather than
- arrays. However if this is your coding style you should
- suppress this message.
- 609 Suspicious pointer conversion -- An assignment is being
- made between two pointers, which differ in size (one is
- far and the other is near) but are otherwise compatible.
- 610 Suspicious pointer combination -- Pointers of different
- size (one is far and the other is near) are being
- compared, subtracted, or paired (in a conditional
- expression). This is suspicious because normally pointers
- entering into such operations are the same size.
- 611 Suspicious cast -- Either a pointer to a function is
- being cast to a pointer to an object or vice versa. This
- is regarded as questionable by the ANSI standard. If this
- is not a user error, suppress this warning.
- 612 Expected a declarator -- A declaration contained just a
- storage class and a type. This is almost certainly an
- error since the only time a type without a declarator
- makes sense is in the case of a struct, union or enum but
- in that case you wouldn't use a storage class.
- 613 Possible use of null pointer 'Symbol' in [left/right]
- argument to operator 'String' Reference -- From
- information gleaned from earlier statements, it is
- possible that a null pointer (a pointer whose value is 0)
- can be used in a context where null pointers are
- inappropriate. Such contexts include: Unary *, pointer
- increment (++) or decrement(--), addition of pointer to
- numeric, and subtraction of two pointers. In the case of
- binary operators, one of the words 'left' or 'right' is
- used to designate which operand is null. Symbol
- identifies the pointer variable that may be NULL. See
- also messages 413 and 794.
- 614 auto aggregate initializer not constant -- An initializer
- for an auto aggregate normally consists of a collection of
- constant-valued expressions. Some compilers may, however,
- allow variables in this context in which case you may
- suppress this message.
- 615 auto aggregate initializer has side effects -- This
- warning is similar to 614. Auto aggregates (arrays,
- structures and union) are normally initialized by a
- collection of constant-valued expressions without
- side-effects. A compiler could support side-effects in
- which case you might want to suppress this message.
- 616 control flows into case/default -- It is possible for
- flow of control to fall into a case statement or a default
- statement from above. Was this deliberate or did the
- programmer forget to insert a break statement? If this
- was deliberate then place a comment immediately before the
- statement that was flagged as in:
- case 'a': a = 0;
- /* fall through */
- case 'b': a++;
- Note that the message will not be given for a case that
- merely follows another case without an intervening
- statement. Also, there must actually be a possibility for
- flow to occur from above.
- 617 String is both a module and an include file -- The named
- file is being used as both an include file and as a
- module. Was this a mistake? Unlike Error 306 (repeated
- module) this is just a warning and processing of the file
- is attempted.
- 618 Storage class specified after a type -- A storage class
- specifier (static, extern, typedef, register or auto) was
- found after a type was specified. This is legal but
- deprecated. Either place the storage class specifier
- before the type or suppress this message.
- 619 Loss of precision (Context) (Pointer to Pointer) -- A far
- pointer is being assigned to a near pointer either in an
- assignment statement or an implied assignment such as an
- initializer, a return statement, or passing an argument in
- the presence of a prototype (Context indicates which).
- Such assignments are a frequent source of error when the
- actual segment is not equal to the default data segment.
- If you are sure that the segment of the far pointer equals
- the default data segment you should use a cast to suppress
- this message.
- 620 Suspicious constant (L or one?) -- A constant ended in a
- lower-case letter 'l'. Was this intended to be a one?
- The two characters look very similar. To avoid
- misinterpretations, use the upper-case letter 'L'.
- 621 Identifier clash (Symbol 'Name' with Symbol 'Name' at
- String) -- The two symbols appeared in the same name
- space but are identical to within the first count
- characters set by option -idlen(count,option). See -idlen
- in Section 5.7 Other Options.
- 622 Size of argument no. Integer inconsistent with format --
- The argument to scanf, fscanf or sscanf, where position is
- given by Integer, was a pointer whose size did not match
- the format. For example,
- int far *p;
- scanf( "%d", p );
- will draw this warning (in the default memory model).
- 623 redefining the storage class of symbol 'Symbol' conflicts
- with Location -- An inter-module symbol was a typedef
- symbol in one module and an ordinary symbol in another
- module. This is legal but potentially confusing. Is this
- what the programmer intended?
- 624 typedef 'Symbol' redeclared (TypeDiff) (Location) -- A
- symbol was declared in a typedef differently in two
- different modules. This is technically legal but is not a
- wise programming practice.
- 625 auto symbol 'Symbol' has unusual type modifier -- Some
- type modifiers such as far, near, fortran are
- inappropriate for auto variables.
- 626 argument no. Integer inconsistent with format -- The
- argument to a printf (or fprintf or sprintf) was
- inconsistent with the format. Although the size of the
- quantity was appropriate the type was not. You might
- consider casting the quantity to the correct type. You
- could also suppress this message, as more flagrant
- violations are picked up with warning 559.