Question

In my CRC8.c I have this function:

BOOL isCRCValid(const UINT8 *ptr, UINT8 Len, UINT8 CRCChar){
    return CRCChar == generateCRC(ptr, Len); //generareCRC returns a UINT8
}

It's is declared in CRC8.h, but PC Lint returns me the following.

Info 714: Symbol 'isCRCValid(const unsigned char *, unsigned char, unsigned
    char)' not referenced
Info 830: Location cited in prior message

Help says 714 is:

714: Symbol 'Symbol' (Location) not referenced -- The named external variable or external function was defined but not referenced. This message is suppressed for unit checkout (-u option).

and 830 is:

830 Location cited in prior message -- Message 830 is a vehicle to convey in 'canonical form' the location information embedded within some other message. For example, consider the (somewhat simplified) message:

     file x.c line 37:  Declaration for 'x' conflicts with line 22

This contains the location ("line 22") embedded in the text of the message. Embedded location information is not normally understood by editors and IDE's (Interactive Development Environments) which can only position to the nominal location (line 37 in this example). By adding this additional message with the nominal location of line 22 the user can, by stepping to the next message and, in this case, see what the 'conflict' is all about. This message and message 831 below do not follow the ordinary rules for message suppression. If they did then when the option -w2 was employed to turn the warning level down to 2 these messages (at level 3) would also vanish. Instead they continue to function as expected. To inhibit them you need to explicitly turn them off using one of:

         -e830 
         -e831

They may be restored via +e830 and +e831; they state of suppression can be saved and restored via the -save -restore options. Options such as -e8* and -e{831} will have no effect.

As I'm newbie with PC Lint, and relative newbie with C, I'm not achieving resolving this problem.

Can anyone help me with this problem?

Était-ce utile?

La solution

The message simply means that PCLint didn't find anything that actually uses this function, so it could be dead code/candidate for removal.

Autres conseils

It could also mean that you did not use the input arguments in your function.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top