我想在debian穩定環境中的某些源上運行splint
。
我需要給予預處理指令-DUINT16_T='unsigned short'
,因爲我經常需要它。我想將其放入我的.splintrc
文件中。
從命令行運行如splint -DUINT16_T='unsigned short' mysource.c
它運行良好。如果移動此行到我.splintrc
文件.splintrc預處理程序指令中的WhiteSpaces -D
-DUINT16_T='unsigned short'
-I/usr/local/include/
的splint
調用導致
Cannot list files in .splintrc files:
short' (probable missing + or -)
A flag is not recognized or used in an incorrect way (Use -badflag to inhibit
warning)
任何人都有一個解決方案? (請不要別名)。
對於furher討論,我會提供一個mnwe(最小不工作的例子)hello.c
,這可能有助於:
#include <stdio.h>
int main (void)
{
UINT16_T returnvalue=0;
printf ("Hello, world!\n");
return returnvalue;
}
命令gcc -DUINT16_T='unsigned short' hello.c
運行正常 - 也確實splint -DUINT16_T='unsigned short' hello.c
當然號稱
Return value type unsigned short int does not match declared type
int: returnvalue
但是,如何將此DEFINE納入我的.splintrc
?
我需要同樣的事情,除了標誌:「-Dbit =無符號的字符」 – Jodes 2014-02-24 12:58:24