PC Lint 错误 714
在我的 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”(位置)--指定的外部 变量或外部函数已定义但未引用。这 单位检出时消息被抑制(-u 选项)。
830 是:
之前消息中引用的 830 位置 -- 消息 830 是前往 以“规范形式”传达嵌入的位置信息 其他一些消息。例如,考虑(稍微简化的) 消息:
文件 xc 第 37 行:“x”的声明与第 22 行冲突
这包含嵌入在文本中的位置(“第 22 行”) 信息。嵌入的位置信息通常无法被理解 编辑器和 IDE(交互式开发环境)可以 仅定位到名义位置(本例中的第 37 行)。经过 使用第 22 行的标称位置添加此附加消息 用户可以通过跳转到下一条消息,在这种情况下,可以看到 “冲突”到底是什么。这条消息和下面的消息831 不遵循消息抑制的普通规则。如果他们这样做了 然后当使用选项 -w2 来降低警告级别时 到 2 这些消息(在级别 3)也将消失。相反,他们 继续按预期运行。为了抑制它们,你需要 使用以下之一显式关闭它们:
<前><代码>-e830 -e831可以通过+e830和+e831恢复它们;他们处于压制状态 可以通过 -save -restore 选项保存和恢复。选项如 因为 -e8* 和 -e{831} 将不起作用。
由于我是 PC Lint 的新手,也是 C 的新手,所以我没有解决这个问题。
谁能帮我解决这个问题吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该消息仅意味着 PCLint 没有找到任何实际使用此函数的内容,因此它可能是要删除的死代码/候选代码。
The message simply means that PCLint didn't find anything that actually uses this function, so it could be dead code/candidate for removal.
这也可能意味着您没有在函数中使用输入参数。
It could also mean that you did not use the input arguments in your function.