gpt4 book ai didi

c - PC Lint 错误 714

转载 作者:行者123 更新时间:2023-12-02 08:52:24 30 4
gpt4 key购买 nike

在我的CRC8.c中我有这个函数:

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

它在 CRC8.h 中声明,但 PC Lint 返回以下内容。

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

帮助说 714 是:

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).

830 是:

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.

因为我是 PC Lint 的新手,也是 C 的相对新手,所以我没有解决这个问题。

谁能帮我解决这个问题?

最佳答案

该消息只是意味着 PCLint 没有找到任何实际使用该函数的东西,因此它可能是死代码/需要删除的候选代码。

关于c - PC Lint 错误 714,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7529602/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com