Hello Dan, in the smatch.txt, you said : If you are building something else (which is not the Linux kernel) then use something like: make CHECK="~/progs/smatch/devel/smatch --full-path" \ CC=~/progs/smatch/devel/smatch/cgcc | tee smatch_warns.txt, I'd like to know what file does this full-path refer to? And if it means the full path of the C project you want to check, what is the difference between using '-p=' and '--full-path'? regards, Lishu Chang > -----原始邮件----- > 发件人: "Dan Carpenter" <dan.carpenter@xxxxxxxxxx> > 发送时间: 2024-03-11 13:01:54 (星期一) > 收件人: "李书畅" <lishuchang@xxxxxxxxxxx> > 抄送: smatch@xxxxxxxxxxxxxxx > 主题: Re: Re: Re: Re: Re: about using smatch in all debian C code > > On Sun, Mar 10, 2024 at 12:56:47PM +0800, 李书畅 wrote: > > Hello Dan, this time I tried to use smatch in a simpler C project named NtyCo, > > Its program address is : https://github.com/wangbojing/NtyCo. > > And I tried CHECK="/home/lsc20011130/smatch/smatch -p=NtyCo" CC=/home/lsc20011130/smatch/cgcc make, it seems worked. > > then I tried /home/lsc20011130/smatch/smatch -p=NtyCo --foo --bar --/home/lsc20011130/NtyCo/core/nty_epoll.c. > > But it doesn't output anything (even though I put some obvious error code in the C file), > > I want to know which of my steps went wrong. > > It's not going to catch every bug. One thing the I do is I pass the > --debug option to Smatch. That generates a ton of output so I'm sure > it's working. > > regards, > dan carpenter