在我的节目中,splint检查警告:解决有关职能的夹板警告“未使用”,而他们作为参数传递
expat-test.c:23:1: Function exported but not used outside expat-test: start
A declaration is exported, but not used outside this module. Declaration can
use static qualifier. (Use -exportlocal to inhibit warning)
expat-test.c:38:1: Definition of start
的start()函数是用来。该程序使用expat XML分析器,该分析器与回调协同工作。你给解析器一个函数:
XML_SetElementHandler(parser, start, end);
和解析器在某些点回调它。这是一个非常常见的C语言,我想知道为什么夹板抱怨。我在FAQ或manual中找不到任何东西。
感谢,开始()函数确实是在同一个文件,并添加“静态”解决了这个问题。夹板现在很高兴,应用程序仍然有效。 – bortzmeyer 2009-01-04 21:56:27
我刚刚注意到,夹板的警告信息提供了一个关于“静态”的提示。对我感到羞耻。 – bortzmeyer 2009-01-04 21:57:29